phpstorm 和 xdebug 之间的连接

And*_*ano 3 php debugging xdebug phpstorm

我配置了 phpstorm-xdebug,并且能够使用断点调试我的代码。这些天我更新了 php(通过brew)和 xdebug,现在我有 php 5.5.26 和 xdebug 2.3.3。当我尝试调试测试(和代码)时,phpstorm 告诉我:“未建立与 xdebug 的连接”。

我已经检查了 php.ini 中 xdebug 的配置,如下

[xdebug]
zend_extension="/usr/local/opt/php55-xdebug/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1
xdebug.idekey=PHPSTORM
Run Code Online (Sandbox Code Playgroud)

网络服务器调试验证说

在此输入图像描述

我尝试使用不同版本的 phpstorm,卸载并重新安装 php55/php55-xdebug,但没有成功。

您知道如何解决这个问题吗?

小智 5

另一种解决方法是更改​​ php.ini 中 xdebug 的端口。以 9001 为例:

xdebug.remote_port=9001

之后,您需要在 Preferences->Languages & Frameworks -> PHP -> Debug 中更改 PhpStorm 中的 xdebug 端口。Xdebug 端口设置为 9001。