PhpStorm 和 Remote XDebug 不工作

PhpStorm and Remote XDebug not working

我已经按照多个教程使用 PhpStorm 设置 XDebug,但它看起来像
我一点也不幸运。无论我尝试什么,它总是卡在
正在等待使用 ide 键的传入连接 'PHPSTORM'
但是当我使用 CTRL + R 重新加载页面时,我可以看到 split second connected.
但是,然后它切换回 "Waiting.."
我试过 XDebug Chrome 插件和 PHPStorm XDebug 生成器书签
以及在 PHPStorm 中启用 "Start listening for PHP Debug Connections"
我将 NginX 与 php5-fpm 一起使用并尝试 tcpdump 9089.
如前所述,它会在一瞬间倾倒它。但是后来又丢了..

有人可以帮我吗?

我的 php.ini 配置:

[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port=9089
xdebug.remote_connect_back=1
xdebug.profiler_enable=1
xdebug.profilter_output_dir="/tmp/xdebug.log"
xdebug.idekey=PHPSTORM

我的 PHPStorm 设置:

[

编辑 :我不知道为什么,但删除 xdebug.remote_connect_back=1
并将其替换为 xdebug.remote_host=my.ip.add.ess 使其有效?!
当我阅读文档时,我了解到第一个设置是针对隐式请求的
而后者是针对显式 ip 请求..

尝试以下设置,听起来很有趣,但只需复制整个块而不是输入它们(相信我,这帮助了我的几个同事)

xdebug.remote_host=10.0.2.2
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.show_exception_trace=0
xdebug.show_local_vars=0
xdebug.var_display_max_data=10000
xdebug.var_display_max_depth=20
xdebug.max_nesting_level=200

p.s。

我假设您的来宾计算机(虚拟机)中存在消音文件,因为您说过它会在声音分割的断点处停止

此外,我假设您的浏览器发送的是正确的 "PHPSTORM"