今天手贱把mac升级到了最新的os High Sierra,还没发现哪里好用后,就发现vscode下不能用xdebug调试了,调试没反应
按照之前的流程修改了各种配置文件后都不行,然后静下心来仔细看phpinfo()
发现里面的xdebug是2.5.3的,但是之前安装的是2.5.5的,再仔细看系统加载的xdebug配置文件是/usr/local/php5/php.d/50-extension-xdebug.ini
所以之前在php.ini里怎么写都是没用的,配置会被覆盖,于是打开/usr/local/php5/php.d/50-extension-xdebug.ini
修改里面的xdebug模块位置和配置如下
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
zend_extension="/usr/local/Cellar/php56-xdebug/2.5.5/xdebug.so"
保存后重启apache,就可以调试了