参考
https://blog.csdn.net/daizikai77/article/details/72103674
https://blog.csdn.net/longwenxia1234/article/details/77170269
其它操作跟上面两个说明的差不多,主要需要注意下面的两点
注意几点
- Mac 自带的
php
需要没有初始配置文件,需要复制/etc/php.ini.default 为 /etc/php.ini
再进行配置 phpStorm
中DBGP
端口要设置成一样的9000
- 我使用的时候主要问题出在
php.ini
的配置上,写下面的就可以。当然,extension 需要指向你的xdebug.so
[xdebug]
zend_extension=/opt/php71/extensions/xdebug.so
xdebug.remote_autostart = On
;是否开启远程调试
xdebug.remote_enable = On
;允许调试的客户端IP
xdebug.remote_host=localhost
;远程调试的端口(默认9000)
xdebug.remote_port=9000
;调试插件dbgp
xdebug.remote_handler=dbgp
;是否收集变量
xdebug.collect_vars = On
;是否收集返回值
xdebug.collect_return = On
;是否收集参数
xdebug.collect_params = On
;是否开启调试内容
xdebug.profiler_enable=On
;设置php显示的级别长度
xdebug.var_display_max_depth=10
xdebug.idekey = PHPSTORM