http://xdebug.org/download.php选择自己需要的xdebug版本。

下载并解压到自己需要的位置。

在php.ini中加入

zend_extension_ts="你的php根目录/ext/php_xdebug.dll"

如果不行改用

zend_extension="你的php根目录/ext/php_xdebug.dll"

然后重启iis或者apache通过phpinfo()输出并查找xdebug是否被成功加载。

完成以上步骤后只是成功加载了xdebug扩展,如果要支持断点调试还需要配置一下xdebug。

在php.ini中加入

;xdebug配置
[Xdebug]
;开启自动跟踪
xdebug.auto_trace = On
;开启异常跟踪
xdebug.show_exception_trace = On
;开启远程调试自动启动
xdebug.remote_autostart = On
;开启远程调试
xdebug.remote_enable = On
;收集变量
xdebug.collect_vars = On
;收集返回值
xdebug.collect_return = On
;收集参数
xdebug.collect_params = On
xdebug.trace_output_dir="e:/wamp/bin/php/debuginfo"
xdebug.profiler_enable=On
xdebug.profiler_output_dir="e:/wamp/bin/php/debuginfo"

xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
重启iis或者apache,尝试一下吧。

相关文章:

  • 2021-07-02
  • 2021-04-26
  • 2021-12-01
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案