Php 无法在Macbook上启用xdebug

Php 无法在Macbook上启用xdebug,php,phpstorm,xdebug,Php,Phpstorm,Xdebug,我需要帮助,这是php-v的输出,您可以看到xdebug已启用。我正在使用PHP8等 但是xdebug仍然不能在PHP风暴中工作。无论该文件是否存在,PHP警告都会出现,即使我在阅读其他帖子/文章等后删除了该文件,但没有成功 xdebug是在CLI Intepreters下配置的,显示出来但仍不能正确运行 php-m的输出 PHP Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/local/Cellar/php/8

我需要帮助,这是
php-v
的输出,您可以看到xdebug已启用。我正在使用PHP8等

但是xdebug仍然不能在PHP风暴中工作。无论该文件是否存在,PHP警告都会出现,即使我在阅读其他帖子/文章等后删除了该文件,但没有成功

xdebug是在CLI Intepreters下配置的,显示出来但仍不能正确运行

php-m的输出

PHP Warning:  Failed loading Zend extension 'xdebug.so' (tried: /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so, 9): image not found), /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so, 9): image not found)) in Unknown on line 0

Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so, 9): image not found), /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so, 9): image not found)) in Unknown on line 0
Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
PHP 8.0.6 (cli) (built: May 13 2021 05:28:04) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.6, Copyright (c) Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
    with Zend OPcache v8.0.6, Copyright (c), by Zend Technologies

警告:加载Zend扩展名'xdebug.so'失败(尝试过:/usr/local/cillar/php/8.0.6_1/lib/php/20200930/xdebug.so(dlopen(/usr/local/cillar/php/8.0.6_1/lib/php/20200930/xdebug.so,9):找不到图像),/usr/local/cillar/php/php/8.0.6_1/lib/php/20200930/xdebug.so.so(dlopen(/usr/local/cillar/cillar/php/8.0.6/php/xdebug/20200930/xdebug.so,9):未找到图像)在第0行的未知位置

表示您试图加载Xdebug两次。一次成功地显示在
php-m
中,一次路径错误,导致此错误。您需要在正在加载的所有ini文件中找到错误的行。您可以找到使用
php--ini
加载的所有ini文件


Warning: Failed loading Zend extension 'xdebug.so' (tried: /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so, 9): image not found), /usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so (dlopen(/usr/local/Cellar/php/8.0.6_1/lib/php/20200930/xdebug.so.so, 9): image not found)) in Unknown on line 0
Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

这些警告是因为您正在进行Xdebug 3设置,该设置已重命名为此警告指示的其他设置。要解决这个问题,请阅读消息中这些警告指向的升级指南

您能提供您的phpinfo输出或php-m以使情况更清楚吗?@TarasBudzyn用输出更新。好的,很好。现在我们还需要xdebug的输出配置,因为我在那里看到了警告。我该如何得到它呢?干杯。事实证明,部分原因是xebug3设置,部分原因是系统上的遗留php未完成设置。一旦我更新了php.ini并删除了重复的
zend_扩展名
,一切都开始正常工作。
Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)