docker php中xdebug的配置内容

php安装xdebug后,再php.ini文件中添加如下内容.

[xdebug]
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so"
;启用性能检测分析
xdebug.profiler_enable=on
;启用代码自动跟踪
xdebug.auto_trace=on
;允许收集传递给函数的参数变量
xdebug.collect_params=on
;允许收集函数调用的返回值
xdebug.collect_return=on
;调试端口
xdebug.show_exception_trace = On ;开启异常跟踪
xdebug.remote_autostart = Off ;开启远程调试自动启动
xdebug.remote_enable = On ;开启远程调试
xdebug.remote_port = 9001
xdebug.idekey=PHPSTORM
xdebug.remote_log=/tmp/xdebug_remote.log
;xdebug.remote_connect_back = On
xdebug.remote_host=docker.for.mac.localhost ;配置宿主机ip,防止宿主机ip每天变动

原文地址:https://www.cnblogs.com/xuezhigu/p/13691484.html