gpt4 book ai didi

php - phpstorm与xdebug的连接

转载 作者:可可西里 更新时间:2023-11-01 00:42:27 25 4
gpt4 key购买 nike

我配置了 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

Web 服务器调试验证说

enter image description here

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

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

最佳答案

另一种解决方法 - 在 php.ini 中更改 xdebug 的端口。例如给 9001:

xdebug.remote_port=9001

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

关于php - phpstorm与xdebug的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31285486/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com