无法让Xdebug与PhpStorm和XAMPP结合使用

时间:2016-02-17 22:29:11

标签: php debugging phpstorm xdebug

我遵循了Xdebug基于phpinfo()推荐的步骤:

  • 下载php_xdebug-2.4.0rc4-5.6-vc11.dll
  • 将下载的文件移至C:\xampp\php\ext
  • 更新C:\xampp\php\php.ini并更改行
  • zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
  • 重新启动网络服务器

我还取消选中了'通过PhpStorm中未注册的服务器配置忽略外部连接。在PhpStorm中配置了端口9000。其他应用程序不使用此端口。

php.ini文件中,我列出了以下配置:

[XDebug]
zend_extension = C:\xampp\php\ext\php_xdebug-2.4.0rc4-5.6-vc11.dll
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.trace_output_dir = "C:\xampp\tmp"

DLL文件存在。

我还通过xdebug插件启用了chrome中的调试功能。

我想错过哪一步?

1 个答案:

答案 0 :(得分:1)

您可能想要设置xdebug.remote_enable = 1,否则将禁用远程调试。

另外,设置远程调试端口phpStorm设置为使用: xdebug.remote_port=9000(我假设端口为9000,这是默认设置,但请检查phpstorm)

要调试每个请求(例如,如果您没有浏览器的chrome插件),请使用xdebug.remote_autostart = on