10 php debugging homebrew xdebug php-7.4
我想用 M1 在我的 Mac 上安装 Xdebug。由于我参加的项目,我使用 PHP 7.4.32。我无法切换 PHP 版本。
当我尝试安装 Xdebug 时,它说我的 PHP 版本必须更新到 8.0.0,但我仍然想使用 7.4.32。
$ pecl install xdebug
> pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 7.4.32
No valid packages found
install failed
Run Code Online (Sandbox Code Playgroud)
当前的 PHP 版本是随 homewbrew 安装的。
$ brew services list
php none 19968 user ~/Library/LaunchAgents/homebrew.mxcl.php.plist
php@7.4 started user ~/Library/LaunchAgents/homebrew.mxcl.php@7.4.plist
php@8.0 none
Run Code Online (Sandbox Code Playgroud)
我也运行brew update命令。一切安好。
如何安装 PHP 7.4.32 的 Xdebug?