访问地址:http://xdebug.org/wizard.php
将本地PHPinfo的信息放入输入框 然后点击 Analyse my phpinfo() output
会显示如下信息(根据个人环境不同显示有所不同)
ummary
- Xdebug installed: 2.5.4
- Server API: Apache 2.0 Handler
- Windows: yes - Compiler: MS VC11 - Architecture: x86
- Zend Server: no
- PHP Version: 5.6.26
- Zend API nr: 220131226
- PHP API nr: 20131226
- Debug Build: no
- Thread Safe Build: yes
- Configuration File Path: C:\Windows
- Configuration File: E:\AppServ\php5\php.ini
- Extensions directory: E:\AppServ\php5\ext
You're already running the latest Xdebug version
But here are the instructions anyway:
- Download php_xdebug-2.5.4-5.6-vc11.dll
- Move the downloaded file to E:\AppServ\php5\ext
- Update
E:\AppServ\php5\php.ini
and change the line
zend_extension = E:\AppServ\php5\ext\php_xdebug-2.5.4-5.6-vc11.dll
- Restart the webserver
根据上面步骤1下载扩展2将扩展文件放入扩展文件夹3修改配置文件4重启web服务器
配置Xdebug
[Xdebug] ;指定Xdebug扩展文件的绝对路径 zend_extension = E:\AppServ\php5\ext\php_xdebug-2.5.4-5.6-vc11.dll ;启用性能检测分析 xdebug.profiler_enable=on ;启用代码自动跟踪 xdebug.auto_trace=on ;允许收集传递给函数的参数变量 xdebug.collect_params=on ;允许收集函数调用的返回值 xdebug.collect_return=on ;指定堆栈跟踪文件的存放目录 xdebug.trace_output_dir="D:/debug" ;指定性能分析文件的存放目录 xdebug.profiler_output_dir="D:/debug" xdebug.profiler_output_name = cachegrind.out.%t.%p