【发布时间】:2021-07-08 19:07:02
【问题描述】:
我正在尝试启用 Xdebug。我在 Ubuntu 上工作,我试用了 PhpStorm 版本 2021.1.1.4。
我的 PHP 版本是 7.4:
PHP 7.4.21 (cli) (built: Jul 1 2021 16:09:41) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
在文件中:/etc/php/7.4/cli/conf.d/20-xdebug.ini 我有设置:
zend_extension=xdebug.so
xdebug.idekey=PHPSTORM
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
Symfony 应用程序正在端口 8000 上运行,PhpStorm 正在侦听调试,如下面的屏幕所示:
可能出了什么问题?为什么它不会在断点处停止?
编辑:
下面我粘贴 xdebug_info() 的结果:
【问题讨论】:
-
你有
with Xdebug v3.0.4.. 但是使用 Xdebug v2 配置。请参阅xdebug.org/docs/upgrade_guide 并升级以使用新的参数名称/值。这就是你现在的起点。 -
所以我现在只需要一行设置:xdebug.mode=debug 对吗?
-
可能就够了。我从不做如此有限的配置(总是配置更多)所以不能肯定地说。无论如何,请检查jetbrains.com/phpstorm/documentation/debugging 和jetbrains.com/help/phpstorm/… 以防万一。
-
只有这一行还是不行。
-
你能把你的设置贴给我吗?
标签: php symfony phpstorm xdebug