mac安装xdebug调试php

//下载xdebug拓展包
https://pecl.php.net/get/xdebug-2.7.2.tgz
//解压 编译 安装 phpize和php-config用自己实际的
tar -zxvf xdebug-2.7.2.tgz
cd xdebug-2.7.2
phpize
./configure     --with-php-config=php-config --enable-xdebug 
make && make install
//php.ini增加配置 重启坏境 查看phpinfo
[xdebug]
zend_extension="/Applications/MAMP/bin/php/php7.3.1/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart = 1
xdebug.idekey = PHPSTORM
xdebug.remote_host=localhost
xdebug.remote_handler = dbgp
;默认的9000已经被php-fpm占用了,换一个端口9001
xdebug.remote_port=9001
xdebug.remote_connect_back = 1
xdebug.scream = 0
xdebug.show_local_vars = 1

配置phpstorm

 

原文地址:https://www.cnblogs.com/godehi/p/14503913.html