Mac下安装PHP调试工具Xdebug

  作者:会飞的

安装步骤brew install php70brew install php70-xdebugphp -i | grep xdebug.ini找到xdebug.ini的配置文件我的是/usr/local/etc/php/7.0/conf.d/ext-xdebug.inivim /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini?12345678910配置如下:[xdebug]zend_extension="/usr/local/

安装步骤

  1. brew install php70

  2. brew install php70-xdebug

  3. php -i | grep xdebug.ini找到xdebug.ini的配置文件我的是/usr/local/etc/php/7.0/conf.d/ext-xdebug.ini

  4. vim /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini

?

1
2
3
4
5
6
7
8
9
10
配置如下:
[xdebug]
zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9001  #这个端口不要被占用即可,可以自行指定
xdebug.idekey = PHPSTORM
xdebug.remote_autostart=1
xdebug.remote_log=/var/tmp/xdebug.log


有用  |  无用

猜你喜欢