2013-06-29 67 views
1

我正在使用Netbeans来完成我的项目(codeigniter),我的xdebug是在php ini中配置的。以下是设置:xdebug不会激活断点

 
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 info显示xdebug已激活。我在login方法中设置变量的断点并开始调试。出现在登录页面的链接:?

本地主机/ 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 

回答

0

这就是我与德里克的答案的帮助:

步骤1:更改xdebug.remote_port = 9000 xdebug.remote_port = 9001

第2步:

  1. 更改在Netbeans中调试端口。转到工具>>选项>>点击PHP选项卡
  2. 在PHP选项卡中单击调试
  3. 更改调试端口:9001
  4. 更改会话ID:于NetBeans XDebug的

第3步:重新启动服务器netbeans

第4步:设置断点并尝试

+1

几天后,试图让xdebug连接到Netbeans,这救了我。谢谢bro – 2014-03-06 03:29:51

+0

不客气的David Tay – madi

1

首先,你需要打开xdebug.remote_enable=1 - 不这样做,调试未激活,它不会工作。

对于第一次“登录”后的请求,xdebug.remote_autostart应该处理该请求,但Netbeans可能不接受新的传入调试连接。要了解Xdebug正在尝试做什么,请添加设置xdebug.remote_log=c:\temp\xdebug.log并调查日志中的内容。 (您可能需要更改路径)。

+0

我编辑了这个问题。请帮我解释日志。谢谢。 – madi