Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
正在使用netbeans等待连接(netbeans xdebug)_Netbeans_Xdebug - Fatal编程技术网

正在使用netbeans等待连接(netbeans xdebug)

正在使用netbeans等待连接(netbeans xdebug),netbeans,xdebug,Netbeans,Xdebug,我已经尽我所能让xdebug与NetBeans一起运行。我在每一个论坛上都尝试过每一个建议,但没有一个对我有帮助。无论我做什么,我总是会遇到可怕的“等待连接(netbeansxdeubg)”,什么都不会发生 赢10分。Apache在本地运行。病毒和防火墙都已禁用。收听9001(我也尝试了9000,没有变化) 相关php.ini: [XDebug] zend_extension = php_xdebug-2.5.4-5.6-vc11.dll xdebug.remote_enable=1 xdebu

我已经尽我所能让xdebug与NetBeans一起运行。我在每一个论坛上都尝试过每一个建议,但没有一个对我有帮助。无论我做什么,我总是会遇到可怕的“等待连接(netbeansxdeubg)”,什么都不会发生

赢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->调试):

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

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

当我运行项目时,它会坐在那里等待;浏览器没有反应。当我终止调试会话时,浏览器会立即弹出一个带有正确url()的选项卡。我尝试在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 
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
相反,如果我在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 
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
日志于2017-10-11 18:21:29打开
I:正在检查远程回接地址。
I:检查标题“HTTP\u X\u转发\u FOR”。
I:检查标题“远程地址”。
I:找到远程地址,连接到127.0.0.1:9001。
I:已连接到客户端。:-)
-> 
-> 
日志于2017-10-11 18:21:34关闭
日志于2017-10-11 18:21:34打开
I:正在检查远程回接地址。
I:检查标题“HTTP\u X\u转发\u FOR”。
I:检查标题“远程地址”。
I:找到远程地址,连接到127.0.0.1:9001。
E:连接到客户端超时:-(
日志于2017-10-11 18:21:34关闭

我已经为此工作了很长时间了。如果有任何帮助,我将不胜感激!

您是否检查了phpinfo()中正确加载的xdebug?您的xdebug是否与您的php版本相匹配?旁注:
netstat-o-n-a | findstr:9001
——您能否添加
-b
参数,并查看实际监听该端口的进程?根据您的描述(所采取的操作及其在xdebug日志中的响应)它应该是NetBeans..但是它没有像应该的那样响应传入的xdebug请求(即使它响应..它太短了)。当它响应的时候,它看起来不是一个IDE响应,而是一些php pfm…这一个有点离题了…但是你认为你可以尝试另一个编辑器/IDE来看看调试在那里是如何工作的吗?我不是说永久性的转换..更多的是“检查它是否在那里工作”。从我的角度来看,我可能建议使用PhpStorm()@tan-应该添加.Yes-xdebug在phpinfo(v2.5.4)中。它与php.ini文件中指定的.dll版本相匹配。该.dll在此处确定()。我还向info.php文件中添加了xdebug调用,调用成功。@LazyOne-使用完全相同的xdebug配置,我能够在Eclipse中顺利运行。我认为这可能是NetBeans配置问题或NetBeans错误。