无法使用 Symfony CLI / Xdebug 进行调试

Can't debug with Symfony CLI / Xdebug

我是 运行 我的服务器,使用 symfony server:start 命令,我想像往常一样使用 PhpStorm 提供的 PHP 远程调试来调试它。

我已经用这些配置了我的 Xdebug:

[XDebug]
xdebug.remote_enable = 1
xdebug.remote_host = localhost
xdebug.remote_port = 9001
xdebug.idekey = PHPSTORM
zend_extension=xdebug.so
xdebug.remote_autostart = 1

我已经为我的浏览器安装了调试工具,并在 PHP 远程调试中配置了我的服务器 window。

当我尝试调试时,我的 IDE 在 /myuser/.symfony/php/3769648aac6303b385b2ccc41cfd442044060c7d-router.php:12 处破坏了路由器,并说它在项目之外。

我也试过路径映射,但没有结果。

如果您需要更多信息,请告诉我。

我是 运行 PHP 7.4 CLI 我尝试安装最新版本的 PHP-FPM,它现在使用与上面相同的配置。

正如@LazyOne 所说,我还禁用了选项 the Settings/Preferences | Languages & Frameworks | PHP | Debug | Xdebug | Force break at first line when a script is outside the project,多亏了他。