【问题标题】:Xdebug PhpStorm : Waiting for incoming connection with ide key 4Xdebug PhpStorm:等待带有 ide 键 4 的传入连接
【发布时间】:2016-03-30 17:41:13
【问题描述】:

我在网上搜索并关注了所有这些。它仍然没有工作。 xdebug 适用于脚本文件,但不适用于 Web 应用程序,xdebug.log 为空。

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

我开始监听 PHP 调试连接。

在我设置 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

感谢任何建议和cmets。

【问题讨论】:

  • 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:连接到客户端。 :-) -> xdebug.org/dbgp/xdebug"
    用户上下文可能不同......您作为系统用户:组可能具有写访问权限,但也许 apache(?) 进程在用户:组下自动启动,但没有。我在 xdebug 的早期就被它咬了 ;)

标签: phpstorm


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    解决了。在 php.ini 中有一个额外的行“extention=/path to/xdebug.so”。删除此行后。它运作良好。 感谢您的帮助。

    【讨论】:

    • php.ini中没有'extention=/path'这一行,我找不到这一行。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-23
    相关资源
    最近更新 更多