PhpStorm 没有与 xdebug 的传入连接(nginx / php-fpm)

Hel*_*röm 5 php xdebug nginx

我想我会尝试使用 nginx 而不是 Apache 并查看它是如何工作的,并且我已经启动并运行了,但是为了我的生活,我无法弄清楚如何让 PhpStorm 捕获传入的 xdebug 连接。当我运行 Apache 时,它​​运行良好。

通常,你会在 PhpStorm 中得到一个“传入连接”窗口——这个窗口现在因它的缺失而发光——是的;我已经阅读了 StackOverflow 上的每一个 PhpStorm/Xdebug 问题,但都没有解决我的问题。

配置:操作系统:OSX Mavericks PhpStorm 版本:7.1 Xdebug 版本:2.2.5

请注意,我正在运行 nginx 和 PHP,通过php-fpm它们按预期工作。我已经指出了与 php-fpm 运行到 PhpStorm 相同的 PHP 文件,它成功地找到了 Xdebug 作为调试器。

由于php-fpm像 Xdebug 一样运行端口 9000,我已将其更改为 9900 和 9001(两者都尝试过)并确保检查我phpinfo()的服务器是否已使用它更新了 php.ini 配置,并且我已经检查过我已经更新了 PhpStorm 中的 Xdebug 端口。我还在 PhpStorm 中启用了“开始侦听调试连接”。

来自 php.ini 的 Xdebug 配置:

[xdebug]
zend_extension = /usr/local/Cellar/php55/5.5.14/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.auto_trace=0
xdebug.default_enable=1
xdebug.idekey="PHPSTORM"
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=0
xdebug.profiler_output_dir="/tmp"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_mode=req
xdebug.remote_port=9001
Run Code Online (Sandbox Code Playgroud)

如前所述 - 当我phpinfo()在浏览器中加载时会加载 xdebug ,并且我已经在 PhpStorm 中设置了正确的端口。

谢谢你的帮助。

Hel*_*röm 0

当我更改设置时,我似乎错过了一件事 - 停止监听断点,然后重试。这似乎已经解决了问题......