无法通过xdebug发回信息:PhpStorm + xdebug + ec2-linux

时间:2017-06-25 10:09:41

标签: php linux amazon-ec2 phpstorm xdebug

因此,根据我的php.ini和PhpStorm(验证Web服务器上的调试器配置),xdebug已完美安装和配置,并且PhpStorm能够接收和发送信息到远程服务器上的xdebug。

但是,当我添加断点并明确达到这些断点时,我不会得到任何调试器信息,如变量及其内容。我不知道我还缺少什么,但这是我的phpinfo()屏幕截图:

enter image description here

修改 我还在chrome浏览器中安装了xdebug helper的扩展名。已启用。这是我的xdebug日志:

    Log opened at 2017-06-27 04:02:49
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to <my address>:9000.
W: Creating socket for '<my address>:9000', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2017-06-27 04:02:49

Log opened at 2017-06-27 04:04:58
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to <my address>:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-06-27 04:04:59

Log opened at 2017-06-27 04:05:22
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to <my address>:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-06-27 04:05:22

Log opened at 2017-06-27 04:05:58
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to <my address>:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-06-27 04:05:58

Log opened at 2017-06-27 04:06:05
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to <my address>:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-06-27 04:06:05

修改 这是我用来激活xdebug会话的phpstorm书签的javascript:

javascript:(/** @version 0.5.2 */function() {document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';})()

修改

以下是我在Windows上的资源监视器的屏幕截图,确实显示phpstorm.exe正在侦听端口9000并且该端口已打开以进行通信:

enter image description here

1 个答案:

答案 0 :(得分:0)

看起来Xdebug无法连接到端口上的IP地址<myaddress> 9000.哪个应该是Windows机器的IP地址。有可能 阻止它的Windows防火墙(或“防御者”),或者可能存在 阻止连接的其他东西。超时可能会指出这一点 更多的是防火墙。