docker xdebug phpstorm

  1. xdebug.ini
[xdebug]
zend_extension="xdebug.so"
;是否开启远程调试
xdebug.remote_enable=1
;允许调试的客户端IP 这个一定要有
xdebug.remote_host=宿主机的ip
;远程调试的端口(默认9000)需要在phpstorm里面设定
xdebug.remote_port=19000
;是否开启调试内容
xdebug.profiler_enable=1
; 这个是约定的调试码,需要在phpstorm里面设定
xdebug.idekey=PHPSTORM
;调试插件dbgp
xdebug.remote_handler=dbgp
;是否开启异常跟踪
xdebug.show_exception_trace=1
;是否开启远程调试自动启动
xdebug.remote_autostart=1
  1. phpstorm配置
    2.1 xdebug端口,与xdebug.ini文件一致


    image.png

    2.2 DBGp 配置


    image.png

    2.3 servers配置,挂载docker中的绝对地址路径,与nginx.conf配置的root地址一致,
    image.png

完事儿,直接输入链接,开始调试,对了先打个电话


image.png

你可能感兴趣的:(docker xdebug phpstorm)