PhpStorm中Xdebug卡在已删除的旧断点处求助
解决PhpStorm+Xdebug+Docker残留断点问题
清理PhpStorm断点缓存
关闭PhpStorm后,找到IDE缓存目录,删除含breakpoints的文件/文件夹:- Windows:
C:\Users\<你的用户名>\.PhpStorm<版本号>\system\caches - macOS:
~/Library/Caches/PhpStorm<版本号>/caches - Linux:
~/.cache/JetBrains/PhpStorm<版本号>/caches
删除后重启PhpStorm。
- Windows:
清理Docker容器内Xdebug临时缓存
进入容器执行命令查找并删除Xdebug相关临时文件:find /tmp -name "*xdebug*" -delete之后重启容器内的PHP服务。
重置PhpStorm调试配置
打开PhpStorm,进入File > Settings > Build, Execution, Deployment > Debugger,点击右上角Restore Defaults,重新配置Xdebug与Docker的路径映射及调试关联。排查代码中的硬编码断点
全局搜索项目代码,确认没有xdebug_break();这类硬编码调试语句残留。清除PHP opcode缓存
若开启了OPcache,进入容器执行重置命令:php -r "opcache_reset();" # 若使用PHP-FPM,补充重启服务 service php-fpm restart
内容的提问来源于stack exchange,提问作者t0is
相关产品推荐
相关产品推荐

