我正在使用 Netbeans 来完成我的项目(codeigniter),并且我的 xdebug 在 php ini 中配置。以下是设置:
zend_extension = "C:\xampp\php\ext\php_xdebug.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 = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_autostart = 1
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_log="C:\xampp\tmp\xdebug.log"
xdebug.remote_port=9001
php信息显示xdebug已激活。我在登录方法中的变量上设置了断点并开始调试。登录页面出现链接:
localhost/goldilock/index.php?XDEBUG_SESSION_START=netbeans-xdebug
登录后,断点未激活,无法调试,并且链接的 XDEBUG_SESSION_START=netbeans-xdebug 部分消失。
有什么办法可以启动调试吗?我找不到任何解决方案来将调试器激活到断点。
xdebug.log 的内容如下:
Log opened at 2013-07-01 05:40:22
I: Connecting to configured address/port: 127.0.0.1:9000.
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:23
Log opened at 2013-07-01 05:40:35
I: Connecting to configured address/port: 127.0.0.1:9000.
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:36
Log opened at 2013-07-01 05:40:38
I: Connecting to configured address/port: 127.0.0.1:9000.
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:39
Log opened at 2013-07-01 05:40:39
I: Connecting to configured address/port: 127.0.0.1:9000.
E: Could not connect to client. :-(
Log closed at 2013-07-01 05:40:40
首先,您需要打开xdebug.remote_enable=1
— 没有它,调试就不会被激活,也不会起作用。
对于第一次“登录”后的请求,xdebug.remote_autostart
应该处理这个问题,但 Netbeans 可能不接受新的传入调试连接。要了解 Xdebug 正在尝试执行的操作,请添加设置xdebug.remote_log=c:\temp\xdebug.log
并调查日志中的内容。 (您可能必须更改路径)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)