- xdebug.ini
[xdebug]
zend_extension="xdebug.so"
;是否開啟遠(yuǎn)程調(diào)試
xdebug.remote_enable=1
;允許調(diào)試的客戶端IP 這個(gè)一定要有
xdebug.remote_host=宿主機(jī)的ip
;遠(yuǎn)程調(diào)試的端口(默認(rèn)9000)需要在phpstorm里面設(shè)定
xdebug.remote_port=19000
;是否開啟調(diào)試內(nèi)容
xdebug.profiler_enable=1
; 這個(gè)是約定的調(diào)試碼,需要在phpstorm里面設(shè)定
xdebug.idekey=PHPSTORM
;調(diào)試插件dbgp
xdebug.remote_handler=dbgp
;是否開啟異常跟蹤
xdebug.show_exception_trace=1
;是否開啟遠(yuǎn)程調(diào)試自動(dòng)啟動(dòng)
xdebug.remote_autostart=1
-
phpstorm配置
2.1 xdebug端口,與xdebug.ini文件一致
image.png
2.2 DBGp 配置
image.png
2.3 servers配置,掛載docker中的絕對(duì)地址路徑,與nginx.conf配置的root地址一致,
image.png
完事兒,直接輸入鏈接,開始調(diào)試,對(duì)了先打個(gè)電話

image.png


