【问题标题】:PHP debugging configurationPHP调试配置
【发布时间】:2015-10-21 06:58:58
【问题描述】:

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

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>

【问题讨论】:

    标签: php macos xampp phpstorm


    【解决方案1】:

    “命令不可用”行可能存在,因为您在 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,因为该问题已解决。

    【讨论】:

      猜你喜欢
      • 2011-02-09
      • 2011-08-31
      • 2011-12-10
      • 2011-12-12
      相关资源
      最近更新 更多