①安装,参考 https://xdebug.org/docs/install
>>git clone git://github.com/xdebug/xdebug.git
>>cd xdebug/
>>phpize
>>./configure --enable-xdebug
>>make
>>make install
②修改mac电脑安装php下的php.ini
/usr/local/etc/php/7.1/php.ini
添加下面一行:
zend_extension=xdebug.so
注意:官网上提示的是zend_extension,如果是extension会提示报错。
③在phpstom中配置php