PhpStorm 不会在断点处停止 Xdebug

PhpStorm not stopping at breakpoints Xdebug

我正在尝试使用 Xdebug 调试 Yii2 项目。

在格式化MacOS之前,我刚从浏览器进入web项目(Apache 2 web server),PhpStorm在断点处自动停止。现在我已经设置了所有内容,但 PhpStorm 并没有就此停止。

这是调试器的 PhpStorm 验证:

这是 CLI 解释器(php 7.0 可执行文件)

这是 xdebug 的 IDE 键:

我已经安装了 Xdebug Chrome 扩展,它处于调试模式。

我错过了什么? PhpStorm 断点不停的可能是什么原因?

Before formatting the MacOS, I just entered the web project (Apache 2 web server) from browser and PhpStorm was automatically stopping at breakpoints. Now I have set up everything but PhpStorm does not stop at them.

很可能您安装了太多东西。我的意思是 - 您不知道的东西或它是如何工作的。

现在听起来可能是 php-fpm -- 它也使用 Xdebug 默认使用的 TCP 9000 端口...所以当 Xdebug正在与 IDE 建立调试连接,它连接到 php-fpm(并且 PhpStorm 无法在 Mac 上检测到此类端口已在使用中)。

因此:请在 php.ini 和 PhpStorm 设置中将 Xdebug 端口更改为其他数字(例如 9001 应该没问题)。

由于 XDebug 显示为已加载到您的 PHPSotmr 配置中,因此您的 php.ini.

中已经有 zend_extension = "/path/to/xdebug.so"

您可能在 php.ini 中没有其他必需的设置。

检查您的 php.ini 中是否设置了以下值:

xdebug.remote_autostart=On
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_port=9000