【发布时间】:2014-08-29 21:08:18
【问题描述】:
我想我会尝试使用 nginx 而不是 Apache,看看它是如何工作的,我已经启动并运行了,但为了我的生活,我无法弄清楚如何让 PhpStorm 捕获传入的 xdebug 连接。当我运行 Apache 时,它运行良好。
通常,你会在 PhpStorm 中获得一个“传入连接”窗口——这个窗口现在会因为它的缺失而闪耀——是的;我已经阅读了 StackOverflow 上的每一个 PhpStorm / Xdebug 问题,但都没有解决我的问题。
配置: 操作系统:OSX Mavericks PhpStorm 版本:7.1 Xdebug 版本:2.2.5
请注意,我正在通过php-fpm 运行 nginx 和 PHP,它按预期工作。我已经指出与 php-fpm 相同的 PHP 文件正在运行到 PhpStorm,它成功地将 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
如前所述 - 当我在浏览器中加载 phpinfo() 并且我在 PhpStorm 中设置了正确的端口时,xdebug 被加载。
感谢您的帮助。
【问题讨论】: