PHP添加Xdebug扩展
一、下载对应的DLL二、把文件放在PHP安装目录下的ext文件夹中
三、修改php.ini
添加以下配置
zend_extension="./ext/php_xdebug-2.2.3-5.3-vc9-nts.dll"
;以下是参数
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.trace_output_dir="./xdebug"
xdebug.profiler_enable=on
xdebug.profiler_output_dir="./xdebug"注意: xdebug.trace_output_dir="./xdebug" 配置是把调试文件放在PHP安装目录下的xdebug文件夹中,所以要在PHP安装目录下新建xdebug文件夹
xdebug.profiler_output_dir="./xdebug" 配置是把调试文件放在所运行项目下的xdebug文件夹中,所以要在项目目录下新建xdebug文件夹
测试
新建php文件
<?php
testXdebug();
function testXdebug() {
require_once('abc.php');
}
?> 运行查看php安装目录下的xdebug文件夹中是否生成文件,生成文件则安装成功
页:
[1]