无法使Xdebug与EC2服务器一起使用

时间:2019-01-24 08:08:04

标签: amazon-ec2 phpstorm xdebug

我正在尝试让Xdebug从EC2实例连接到我的PhpStorm。

  • 我已在与EC2实例绑定的安全组上打开了端口9000。
  • 在使用UDP打开它之前,我会得到:

    telnet: connect to address <IP>: Connection refused
    telnet: Unable to connect to remote host```
    
  • 打开它后,我得到: Trying <IP>...,它就挂在那里。

  • 我从内部将9020端口转发到外部9000端口,以查看是否会产生任何不同的结果(因为我在路由器上找不到用于简单打开端口的设置)
  • 我的xdebug.ini设置位于:/etc/php-5.6.d/50-xdebug.ini(是的,我必须在这里使用非常旧的PHP版本)。
  • 我的xdebug.ini包含以下内容:
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.idekey=PHPSTORM
xdebug.remote_connect_back = On
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode = req
  • 我正在使用PhpStorm,现在让它在端口9020上侦听(在端口转发之前尝试9000,结果相同)。
  • 我已安装Xdebug浏览器扩展并将其设置为PHPSTORM。
  • 我已在第一行以及断点处停下来,以防万一。
  • Xdebug设置为侦听。

当我从浏览器中访问PHP页面时,什么也没有发生。我已经工作了数十次,但从未在EC2实例中进行过。知道我错过了什么吗?

0 个答案:

没有答案
相关问题