MAC下安装Xdebug

环境

首先安装 autoconf 

下载最近版的Xdebug源码解压 cd到目录去

phpize

./configure

make

sudo make install

php.ini文件添加

zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
[xdebug]
xdebug.idekey="PHPSTORM7"
xdebug.remote_enable=On
xdebug.remote_host= localhost
xdebug.remote_port=9000

重启apache sudo apachectl restart

phpinfo()

phpstorm 设置

安装firefox插件 The easiest Xdebug 2.0

IDE key for remote debugging:PHPSTORM7 这里和php.ini中一致

打开phpstorm 进入项目

激活 firefox的红色虫子

输入项目地址访问

安装成功

原文地址:https://www.cnblogs.com/qifeng1991/p/4049489.html