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

时间:2016-03-30 17:41:14

标签: phpstorm

我在网上搜索并跟踪了所有这些内容。它仍然无法正常工作。 xdebug适用于脚本文件,但不适用于Web应用程序,xdebug.log为空。

my php.ini file:

phpinfor():
xdebug support       enabled
version              2.2.3
ide key              11047

我开始侦听PHP调试连接。

debug session example here.

在我设置XDEBUG_SESSION_START之前它已经运行。

这是我的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

感谢任何建议和意见。

2 个答案:

答案 0 :(得分:1)

默认情况下,PHPStorm假定调试会话将在端口9000上。根据您的php.ini文件,您已将xdebug配置为在端口9001上运行。在PHPStorm中,转到设置&gt; Langauge&amp; Frameworks&gt; PHP&gt;调试并确保&#34;调试端口&#34;匹配您的php.ini端口设置9001.

答案 1 :(得分:0)

解决。有一个额外的行&#34; extention = / path to / xdebug.so&#34;在php.ini中。删除此行后。它运作良好。 谢谢你的帮助。