2015-10-21 60 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,因爲這個問題已經修復。