phpstorm docker容器内配置断点调试xdebug

以下为 php.ini 配置
[XDebug]
xdebug.mode = debug,trace
xdebug.start_with_request = yes
xdebug.remote_handler="dbgp"
xdebug.idekey="PHPSTORM"
xdebug.log = "/var/log/xdebug.log"
xdebug.client_port=9001
xdebug.client_host = "host.docker.internal"
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
xdebug.remote_autostart=1
xdebug.remote_enable=1

phpstorm配置

  1. 如图 将Debug port设置与php.ini中配置对应

  2. 如图 将IDE key及 port设置与php.ini中配置对应
  3. 如图勾选路径映射 并填写项目对应容器内路径

     

 

 

 

 

 

 

 

 

 

posted on 2022-10-25 13:10  老猫爱豆  阅读(77)  评论(0编辑  收藏  举报

导航