【发布时间】:2012-11-25 07:00:27
【问题描述】:
我已经在 wamp+netbeans 中配置了 xdebug。它安装正确并在phpinfo() 中显示了xdebug 配置信息。但我仍然无法用它调试我的应用程序。
有时它会显示waiting for connection 错误。有时它不会显示它,但也不会在给定的断点处停止。
Following is my configuration :
PHP Version 5.3.9
PHP Extension Build API20090626, TS, VC9
In D:\wamp\bin\php\php5.3.9\ext\php_xdebug-2.2.1-5.3-vc9.dll
xdebug version: (in phpinfo)
Version 2.2.1
IDE Key netbeans-xdebug
In php.ini file
[xdebug]
zend_extension = "D:/wamp/php/ext/php_xdebug-2.2.1-5.3-vc9.dll"
xdebug.profiler_output_dir = "D:/wamp/tmp/xdebug"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable = 0
xdebug.profiler_append = 0
xdebug.extended_info = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.idekey = xdebug
xdebug.remote_log = "D:/wamp/tmp/xdebug/xdebug_remot.log"
xdebug.show_exception_trace = 0
xdebug.show_local_vars = 9
xdebug.show_mem_delta = 0
xdebug.trace_format = 0
我几乎遵循了谷歌上的所有教程(也在 stackoverflow 上),我认为配置似乎是正确的。那么会有什么问题呢?
如果您想了解有关配置的更多信息,请告诉我。
任何帮助将不胜感激。
提前致谢。
【问题讨论】:
-
检查 IDE 中的端口是否与 php.ini 中设置的端口一致
-
我也有同样的问题。我在 Windows 7 中使用 XAMPP,也无法运行调试。此外,我在使用 Ubuntu 时也遇到了同样的问题,所以这肯定不是 Windows 7 或 WAMP 孤立的问题。
-
最好的方法是检查“D:/wamp/tmp/xdebug/xdebug_remot.log”中的内容——该日志文件的存在是有原因的!
-
这对我有用。我在netbeans中将端口设置为9001。此外,我建议在 php.ini 文件中将“xdebug.idekey = xdebug”更改为“xdebug.idekey = netbeans-xdebug”。
标签: php netbeans windows-7 wamp xdebug