TOC目录
打开TOC目录
首先我php版本是5.6和7.2两个版本,php5.6下载的是xdebug2.5.5,php7.2使用Homebrew在Linux和macOS上通过PECL安装Xdebug,命令是
pecl install xdebug
Xdebug下载 可以根据自己php版本在官网下载对应的xdebug版本
解压
tar -xvzf xdebug-2.5.5.tgz
进入解压后的目录
cd xdebug-2.5.5
运行脚本生成 configure文件
phpize
安装与编译,—with-php-config目录后跟着自己php环境下的php-config文件路径
./configure --enable-xdebug --with-php-config=/opt/homebrew/opt/php@5.6/bin/php-config
make clean
make
make install
打开php.ini加入下面内容,里面没注释部分是xdebug2的配置,而;分号注释的配置是xdebug3以上版本的配置
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= 127.0.0.1
xdebug.remote_port = 9003
xdebug.remote_autostart = On
xdebug.idekey = PHPSTORM
zend_extension="xdebug.so"
;xdebug.start_with_request = Yes
;xdebug.client_port=9003
;xdebug.mode=debug