在Mac上的PHPSTORM配置XDebug来调试PHP程序

2017-04-06  本文已影响0人  西风老耄

安装XDebug

xdebug
xdebug support => enabled
xdebug.auto_trace => Off => Off
xdebug.cli_color => 0 => 0
...```

#配置XDebug
* 执行`php -i | grep php.ini`找到mac上php.ini的位置

Configuration File (php.ini) Path => /usr/local/etc/php/7.1
Loaded Configuration File => /usr/local/etc/php/7.1/php.ini```

[Xdebug]
zend_extension="/usr/local/Cellar/php71-xdebug/2.5.1/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.idekey = PHPSTORM

注:上面的zend_extension是你的xdebug的真实安装位置,如果忘记的话,可以执行brew info <第一步安装的xdebug> 来找到位置

配置PhpStorm

PHP配置界面 点击点点点 添加php解释器路劲 添加完毕 填入XDebug的信息

配置Chrome插件

Debug程序

上一篇 下一篇

猜你喜欢

热点阅读