2015-10-21 62 views
0

当试图在OS X上的XAMPP中配置XDebug以连接回PHPStorm,并在xdebug日志中接收到以下消息并且无法停止在PHPStorm中的断点处时。接下来要尝试的任何提示?PHP调试配置

Xdebug.log

Log opened at 2015-10-16 21:36:56 
I: Checking remote connect back address. 
I: Remote address found, connecting to ::1:9002. 
I: Connected to client. 
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///Applications/XAMPP/xamppfiles/htdocs/eatdata/app/php/crops/getCropTypes.php" language="PHP" protocol_version="1.0" appid="23586" idekey="PHPSTORM"><engine version="2.2.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2014 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:///Applications/XAMPP/xamppfiles/htdocs/eatdata/app/php/connect.php -n 71 
-> <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> 

相信此行特别指出的问题,但不知道究竟该消息意味着。

<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> 

回答

0

的“命令不可用”行很可能存在,因为你有一个错字/语法错误某处http://xdebug.org/dbgp/xdebug" fileuri="file:///Applications/XAMPP/xamppfiles/htdocs/eatdata/app/php/crops/getCropTypes.php - 你可以运行php -l反对它找出来?

由于文件名中的区分大小写,我也可以看到一个问题。 OS/PHP有时会报告文件的不同情况,而不是编辑器期望的情况。我发现你使用的是2.2.5版本,因此我建议你升级到至少2.3.0,因为这个问题已经修复。