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每天變動