使用NetBeans等待连接(netbeans-xdebug)

时间:2017-10-11 22:25:26

标签: netbeans xdebug

我已尽力使xdebug与NetBeans一起运行。我已经在我能找到的每个论坛上尝试过每一个建议,但都没有帮助过。无论我做什么,我总是得到可怕的“等待连接(netbeans-xdeubg)”,没有任何反应。

Win 10. Apache在本地运行。病毒和防火墙都被禁用。听9001(我也试过9000,没有变化)。

相关的php.ini:

[XDebug]
zend_extension = php_xdebug-2.5.4-5.6-vc11.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"

xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\temp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_log="c:\temp\xdebug.txt"
xdebug.trace_output_dir = "c:\temp"
; 3600 (1 hour), 36000 = 10h
xdebug.remote_cookie_expire_time = 36000
xdebug.var_display_max_data = 2048

Net Beans项目配置:

Debugger Proxy: 127.0.0.1, Port 9001

Net Beans php调试(工具 - >选项 - > PHP->调试):

Debugger Port: 9001
Session ID: netbeans-xdebug
Max Data Length: 2048

[编辑:@lazyone] NetBeans启动并手动打开浏览器选项卡后:

C:\ WINDOWS \ system32> netstat -o -n -a -b(排除任何非9001结果):

  TCP    0.0.0.0:9001           0.0.0.0:0              LISTENING
 [netbeans64.exe]
  TCP    127.0.0.1:9001         127.0.0.1:63119        ESTABLISHED
 [netbeans64.exe]
  TCP    127.0.0.1:9001         127.0.0.1:63123        ESTABLISHED
 [netbeans64.exe]
  TCP    127.0.0.1:63119        127.0.0.1:9001         ESTABLISHED
 [netbeans64.exe]
  TCP    127.0.0.1:63123        127.0.0.1:9001         ESTABLISHED
 [httpd.exe]
  TCP    [::]:9001              [::]:0                 LISTENING
 [netbeans64.exe]

当我运行项目时,它会坐下来等待;浏览器没有反应。当我终止调试会话时,浏览器会立即使用正确的URL(http://local.ct.com/info.php?XDEBUG_SESSION_START=netbeans-xdebug)拉出一个选项卡。我在IDE等待时尝试手动启动该URL,但没有任何变化。

请注意,如果我在从NetBeans开始调试时检查远程日志(等待...)然后停止它,我会在日志中获得以下内容:

Log opened at 2017-10-11 18:18:26
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 127.0.0.1:9001.
E: Time-out connecting to client. :-(
Log closed at 2017-10-11 18:18:26 

如果我开始在Netbeans中调试(等待...),然后手动打开选项卡(仍在等待...),然后停止它,我在日志中得到以下内容:

Log opened at 2017-10-11 18:21:29
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 127.0.0.1:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///C:/userdata/CMP/ct/cmp/ct/htdocs/info.php" language="PHP" xdebug:language_version="5.6.1-dev" protocol_version="1.0" appid="13596" idekey="netbeans-xdebug"><engine version="2.5.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2017 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2017-10-11 18:21:34

Log opened at 2017-10-11 18:21:34
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 127.0.0.1:9001.
E: Time-out connecting to client. :-(
Log closed at 2017-10-11 18:21:34

我一直在努力工作这个漫长的时间。任何帮助都会非常感激!

0 个答案:

没有答案