Xdebug PhpStorm:正在等待ide键4的传入连接

Xdebug PhpStorm:正在等待ide键4的传入连接,phpstorm,Phpstorm,我在网上搜索并跟踪了所有人。它仍然不起作用。xdebug可以在脚本文件上工作,但不能在web应用程序上工作,xdebug.log为空 我开始监听PHP调试连接 在我设置XDEBUG\u会话\u启动之前,它就工作了 这是我的xdebug.log文件: Log opened at 2016-03-30 19:13:03 I: Connecting to configured address/port: 127.0.0.1:9001. I: Connected to client. :-) -&g

我在网上搜索并跟踪了所有人。它仍然不起作用。xdebug可以在脚本文件上工作,但不能在web应用程序上工作,
xdebug.log
为空

我开始监听PHP调试连接

在我设置XDEBUG\u会话\u启动之前,它就工作了

这是我的xdebug.log文件:

Log opened at 2016-03-30 19:13:03
I: Connecting to configured address/port: 127.0.0.1:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///root/marketriders/public/index.php" language="PHP" protocol_version="1.0" appid="4476" idekey="17624"><engine version="2.2.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>

<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>

<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>

<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>

<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>

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

<- breakpoint_set -i 6 -t line -f file:///root/marketriders/public/index.php -n 30
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>

Log closed at 2016-03-30 19:13:03
日志于2016-03-30 19:13:03打开
I:连接到配置的地址/端口:127.0.0.1:9001。
I:已连接到客户端。:-)
-> 
日志于2016-03-30 19:13:03关闭

欢迎提供任何建议和意见。

默认情况下,PHPStorm假定调试会话将在端口9000上进行。根据php.ini文件,您已将xdebug配置为在端口9001上运行。在PHPStorm中,转到设置>语言与框架>PHP>调试,确保“调试端口”与PHP.ini端口设置9001匹配

已解决。php.ini中还有一行“extention=/path to/xdebug.so”。删除此行后。它工作得很好。
感谢您的帮助。

1)最好升级到xdebug v2.3.2 2)请为此类失败的调试提供xdebug日志。如果尝试使用xdebug v2.4 dev,它也有相同的问题。xdebug.log为空。请确保运行php的进程对
xdebug.log
文件具有写入权限。。。在过去,由于缺乏这一点,我有一些奇怪的行为。我调试了与脚本相同的文件。成功了。以下是日志文件的一部分:在2016-03-30 15:00:51打开的日志I:连接到配置的地址/端口:127.0.0.1:9000。I:已连接到客户端。:-->用户上下文可能不同。。。您作为系统user:group可能有写访问权限,但apache(?)进程可能是在user:group下自动启动的,而user:group没有。我在xdebug早期就被它咬了;)php.ini中没有这一行“extention=/path”,我找不到这一行。
Log opened at 2016-03-30 19:13:03
I: Connecting to configured address/port: 127.0.0.1:9001.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///root/marketriders/public/index.php" language="PHP" protocol_version="1.0" appid="4476" idekey="17624"><engine version="2.2.3"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>

<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>

<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>

<- feature_set -i 3 -n max_children -v 100
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>

<- status -i 4
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="status" transaction_id="4" status="starting" reason="ok"></response>

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

<- breakpoint_set -i 6 -t line -f file:///root/marketriders/public/index.php -n 30
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6"><error code="5"><message><![CDATA[command is not available]]></message></error></response>

Log closed at 2016-03-30 19:13:03