mac M2 装PHP xdebug

目前xdebug你不支持arm 只能自编译

pecel 安装是arm64

arch -arm64 sudo pecl install xdebug

编译

git clone https://github.com/xdebug/xdebug.git
cd  xdebug
phpize
./configure --enable-xdebug  --host=arm-linux-gnueabi
make
make install

修改 配置

  • 生成的位置:
    • xdebug/modules/xdebug.so
  • 配置文件
    • /opt/homebrew/etc/php/8.2
[xdebug]
zend_extension= /opt/homebrew/Cellar/php/8.2.6/pecl/20220829/xdebug.so
xdebug.mode=debug
debug.client_host=127.0.0.1
xdebug.start_with_request=yes
xdebug.idekey=PHPSTROM
posted @ 2023-06-13 11:29  vx_guanchaoguo0  阅读(76)  评论(0编辑  收藏  举报