Xdebug在PHP中的安装配置

Xdebug在PHP中的安装配置涉及php.ini配置文件的修改。

1  首先需要下载Xdebug,根据安装的PHP版本,选择合适的Xdebug版本,

2  安装Xdebug
将下载的php_xdebug-2.1.0-5.3-vc6.dll复制到PHP安装目录下的ext目录,ext目录专门用来存放PHP扩展库DLL文件。
3  配置php.ini
  安装Xdebug的最后一步就是配置php.ini文件,打开C:\php目录下的php.ini配置文件,在末尾添加

 

[Xdebug]

;模块路径

zend_extension="D:/amp/php/ext/php_xdebug-2.2.6-5.3-vc9.dll"

;是否开启自动跟踪

xdebug.auto_trace=On

;是否收集参数

xdebug.collect_params=On

;是否收集返回值

xdebug.collect_return=On

;是否开启调试内容

xdebug.profiler_enable=On

xdebug.profiler_enable_trigger = On

;跟踪输出路径

xdebug.trace_output_dir="D:\amp\apache\htdocs\xdebug\trace"

;调试输出路径

xdebug.profiler_output_dir="D:\amp\apache\htdocs\xdebug\profiler"

xdebug.profiler_output_name = cachegrind.out.%t.%p



;是否开启远程调试

xdebug.remote_enable=On

;允许调试的客户端IP

xdebug.remote_host=127.0.0.1

;远程调试的端口(默认9000)

xdebug.remote_port=9000

;调试插件dbgp

xdebug.remote_handler=dbgp



;是否开启异常跟踪

xdebug.show_exception_trace=On

;是否开启远程调试自动启动

xdebug.remote_autostart=On

;是否收集变量

xdebug.collect_vars=On

 

你可能感兴趣的:(xdebug)