php断点调试--安装xdebug

时间:2021-08-31 06:26:20

选择测试phpinfo()信息

System Windows NT  6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Build Date Jun 5 2013 20:58:05
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\wamp\bin\apache\apache2.4.4\bin\php.ini


看到 我机器是win7 64位的,安装的wamp2.4是64位的

就去http://xdebug.org/download.php下载php_xdebug-2.2.3-5.4-vc9.dll


将下载好的dll文件复制到C:\wamp\bin\php\php5.4.16\ext\ 扩展目录下


并且在php.ini中配置


[XDebug]
zend_extension_ts = "C:\wamp\bin\php\php5.4.16\ext\php_xdebug-2.2.3-5.4-vc9.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "C:\wamp\tmp\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9001
xdebug.trace_output_dir = "C:\wamp\tmp\xdebug"
xdebug.collect_params = 1
xdebug.collect_return = 1
xdebug.show_exception_trace = 1


; ;是否开启调试内容
; xdebug.profiler_enable=1
; ;是否开启自动跟踪
 xdebug.auto_trace = 1
; ;是否开启异常跟踪
; xdebug.show_exception_trace = 1
; ;是否收集变量
; xdebug.collect_vars = 1
; ;是否收集返回值
; xdebug.collect_return = 1
; ;是否收集参数
; xdebug.collect_params = 1
; ;跟踪输出路径
; xdebug.trace_output_dir="D:/nginx-1.5.3/tmp/xdebug"
; ;调试输出路径
; xdebug.profiler_output_dir="D:/nginx-1.5.3/tmp/xdebug"



重启wamp服务器, 查看phpinfo 模块信息,找到XDebug,成功、

php断点调试--安装xdebug