我在 Mac M1 上安装了 xdebug 3,当我运行 php -v 时,它显示 xdebug 已安装。我在下面为您分享一些有价值的信息。
php -v
PHP 7.4.22 (cli) (built: Jul 29 2021 09:14:29) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
locate php.ini
/Library/WebServer/Documents/CP/php.ini.sample
/Library/WebServer/Documents/leohamel/php.ini.sample
/Library/WebServer/Documents/magento/php.ini.sample
/Library/WebServer/Documents/magento2/php.ini.sample
/Library/WebServer/Documents/magento2/vendor/magento/magento2-base/php.ini.sample
/Library/WebServer/Documents/magento_old/php.ini.sample
/System/Library/Templates/Data/private/etc/php.ini.default
/System/Volumes/Update/mnt1/System/Library/Templates/Data/private/etc/php.ini.default
/opt/homebrew/Cellar/php/8.0.9/.bottle/etc/php/8.0/php.ini
/opt/homebrew/Cellar/php@7.4/7.4.22/.bottle/etc/php/7.4/php.ini
/opt/homebrew/etc/php/7.4/php.ini
/opt/homebrew/etc/php/8.0/php.ini
/private/etc/#php.ini#
/private/etc/php.ini-5.2-previous
/private/etc/php.ini-previous
/private/etc/php.ini.default
/private/etc/php.ini.default-5.2-previous
/private/etc/php.ini.default-previous
/private/etc/php.ini.default-previous~orig
/private/etc/php.ini~
/usr/local/Cellar/valet-php@7.1/7.1.25/.bottle/etc/valet-php/7.1/php.ini
/usr/local/Cellar/valet-php@7.2/7.2.13/.bottle/etc/valet-php/7.2/php.ini
我正在使用这个 php.ini /opt/homebrew/etc/php/7.4/php.ini 它也显示在
php --ini
Configuration File (php.ini) Path: /opt/homebrew/etc/php/7.4
Loaded Configuration File: /opt/homebrew/etc/php/7.4/php.ini
Scan for additional .ini files in: /opt/homebrew/etc/php/7.4/conf.d
Additional .ini files parsed: /opt/homebrew/etc/php/7.4/conf.d/ext-opcache.ini
which php
/opt/homebrew/opt/php@7.4/bin/php
这是我在此处粘贴 phpinfo 输出时 xdebug 向导向我显示的内容
Installation Wizard
Summary
Xdebug installed: no
Server API: FPM/FastCGI
Windows: no
Zend Server: no
PHP Version: 7.4.22
Zend API nr: 320190902
PHP API nr: 20190902
Debug Build: no
Thread Safe Build: no
OPcache Loaded: yes
Configuration File Path: /opt/homebrew/etc/php/7.4
Configuration File: /opt/homebrew/etc/php/7.4/php.ini
Extra Configuration Files Path: /opt/homebrew/etc/php/7.4/conf.d
Extra Configuration Files:
/opt/homebrew/etc/php/7.4/conf.d/ext-opcache.ini
Extensions directory: /opt/homebrew/lib/php/pecl/20190902
你能告诉我我在做什么错吗?或者我怎样才能在浏览器输出中看到 xdebug?