Xdebug 3 - 设置“xdebug.remote_***”已重命名,请参阅升级指南

2022-08-30 20:42:31

我刚刚在我的OSX上安装了Xdebug v3.0.0beta1,并尝试在PhpStorm 2020.1上使用它,但我得到这个:

Xdebug: [配置] 设置“xdebug.remote_enable”已重命名,请参阅 https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable 的升级指南(请参阅:https://xdebug.org/docs/errors#CFG-C-CHANGED) Xdebug:[配置] 设置“xdebug.remote_host”已重命名,请参阅 https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host 的升级指南(请参阅:https://xdebug.org/docs/errors#CFG-C-CHANGED) Xdebug: [配置] 设置“xdebug.remote_mode”已重命名,请参阅 https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_mode 的升级指南(请参阅:https://xdebug.org/docs/errors#CFG-C-CHANGED) Xdebug:[配置] 设置“xdebug.remote_port”已重命名,请参阅 https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port

提供的链接只会导致带有错误的图像。

我的问题是要设置的正确设置是什么,以及实际更改它们的位置,因为我在php.ini文件中没有任何关于xdebug的内容。


答案 1

PhpStorm 2020.3 支持 XDebug3。有关于如何正确更改设置的详细升级指南

在我的情况下(使用Docker),我不得不更改设置

从:

; v2.*

[Xdebug]
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=off
xdebug.remote_host=host.docker.internal

;# 9000 is default (not required to set).
xdebug.remote_port=9000

自:

; v3.*

[Xdebug]
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=host.docker.internal

;# 9003 is now the default (set this for old PhpStorm settings).
xdebug.client_port=9000

答案 2

Xdebug 3将仅从PhpStorm 2020.3版本获得支持,该版本目前处于EAP阶段(抢先体验计划),并将在大约1个月的时间内发布。

目前,您必须坚持使用Xdebug 2.9作为2020.1 IDE版本或尝试最新的2020.3 EAP构建版本:https://www.jetbrains.com/phpstorm/nextversion/

Xdebug 3 在最新的 EAP #6 版本中受支持:https://blog.jetbrains.com/phpstorm/2020/11/phpstorm-2020-3-eap-6/


至于Xdebug 3升级,在更改Xdebug设置(php.ini)方面 - 检查此链接:https://xdebug.org/docs/upgrade_guide


如果你愿意,你可以将你的2020.1 PhpStorm与Xdebug 3一起使用 - 只需正确配置Xdebug 3。

在Windows 10上使用Xdebug 3.0.0beta1,PHP 7.4 x64对我来说工作得很好 - 请参阅此问题:https://stackoverflow.com/a/64820427/783119

您看到的那些错误表示您的 php.ini中仍有 Xdebug 2 配置值。


推荐