【发布时间】:2016-11-09 20:09:28
【问题描述】:
我在使用 PhpStorm 和 xdebug 时遇到了一些问题(就像其他人一样)。
我看到并尝试过:
PhpStorm Xdebug : Waiting for incoming connection with ide key
PhpStorm, xdebug and vagrant still waiting for incoming connection
Xdebug PhpStorm: Waiting for incoming connection with ide key
当我启动调试器时,我会转到一个以 XDEBUG_SESSION_START=XXXXXX 结尾的 url。这与我在 phpinfo() 上的 ID 相同。
我的配置:
php.ini
[Xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=192.168.1.113
xdebug.remote_port=9001
xdebug.idkey=PHPSTORM
xdebug.remote_log =/Users/gustavelmgren/xdebug.log
xdebug.log
> Log opened at 2016-11-09 19:52:07 I: Connecting to configured
> address/port: 192.168.1.113:9001. I: Connected to client. :-)
> -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug"
> fileuri="file:///Users/gustavelmgren/dbwebb-kurser/anax-flat/htdocs/index.php"
> language="PHP" protocol_version="1.0" appid="19557"
> idekey="13691"><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>
PhpStorm 设置
【问题讨论】:
-
我只能发布两张图片。这是最后两个:[Server] -> [i.stack.imgur.com/RRMjs.png] [Debug conf] -> [i.stack.imgur.com/KDjFP.png]
-
1) 在 IDE 中设置断点的文件的路径是什么? 2) 显示带有断点的行的屏幕截图 3) 请提供
phpinfo()输出的整个 xdebug 部分(例如通过 Google Drive 或类似方式共享) 4) 与 xdebug 日志相同——这里显示的方式非常无用. 5) 请升级您的 xdebug -- 请至少使用 2.3.x (最好是最新的 2.4.x) 6) 您不需要 DBGp 代理 -- 它仅在某些情况下有用(例如,用于与多个开发人员进行远程调试) 7 ) IP 和端口是否正确? 8) 你确定是 PhpStorm 监听 xdebug 端口吗?