docker - PhpStorm 未将 xdebug 显示为在断点处停止 (docker)

标签 docker intellij-idea docker-compose phpstorm xdebug

所以我让我的 webserver 容器愉快地运行 xdebug,我有 xdebug.remote_log 设置,所以我可以诊断问题。如果我在第一行上放置一个断点 phpstorm 会按预期运行,它会中断,为您提供正常选项。但是如果你让它继续运行超过那个点,phpstorm 就会出现代码超时的现象,它只是挂起。但是,如果我在此期间读取 xdebug remote_log,它会报告它已成功命中我设置的下一个断点并在那里等待,phpstorm 将代码显示为正在执行。

以下是一些配置截图等:

配置文件

enter image description here

设置 > 语言和框架 > php > 调试

enter image description here

设置 > 语言和框架 > php > 服务器 > localhost (docker) 又名我唯一添加的服务器

enter image description here

xdebugs remote_log 末尾的屏幕截图。从 public/index.php 初始断点开始,我允许它运行。然后在这里它声明它在 ListController.php 中中断,这是下一个放置断点的正确位置。正如您可能从上一张图片中猜到的,在 docker 中,repo 位于/srv/www 中,而在我本地的/home/myname/Development/projectName/checkout 中。

enter image description here

xdebug 远程日志:https://pastebin.com/faiQqwMT

some code so stackoverflow will let me link the log

我的idea.log唯一有趣的部分

2018-10-12 10:18:23,772 [81267328] 错误 - plication.impl.ApplicationImpl - com/jetbrains/php/debug/xdebug/debugger/XdebugDriver.onBreak 的@NotNull 参数“remoteFileUrl”的参数不能为null
java.lang.IllegalArgumentException:com/jetbrains/php/debug/xdebug/debugger/XdebugDriver.onBreak 的@NotNull 参数“remoteFileUrl”的参数不能为空
在 com.jetbrains.php.debug.xdebug.debugger.XdebugDriver.$$$reportNull$$$0(XdebugDriver.java)
在 com.jetbrains.php.debug.xdebug.debugger.XdebugDriver.onBreak(XdebugDriver.java)
在 com.jetbrains.php.debug.xdebug.debugger.XdebugDriver$4.onResponse(XdebugDriver.java:172)
在 com.jetbrains.php.debug.xdebug.debugger.XdebugDriver$4.onResponse(XdebugDriver.java:167)
在 com.jetbrains.php.debug.connection.PhpDebugConnection.handleInput(PhpDebugConnection.java:256)
在 com.jetbrains.php.debug.connection.PhpDebugConnection.lambda$startReading$2(PhpDebugConnection.java:290)
在 com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
在 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
在 java.util.concurrent.FutureTask.run(FutureTask.java:266)
在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
在 java.lang.Thread.run(Thread.java:745)

最佳答案

这是一个已知的错误:https://youtrack.jetbrains.com/issue/WI-43622 .切换回 XDebug 2.6 应该可以修复它。

关于docker - PhpStorm 未将 xdebug 显示为在断点处停止 (docker),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52744469/

相关文章:

docker - 如何修复 docker push 错误,标签不存在?

docker - 如何从 ubuntu14.04 上的 localhost 将目录或文件复制到 docker 镜像?

java - Intellij IDEA 模块依赖

maven - 如何从 IntelliJ 中运行带有重置端点的 mvn jetty 服务器进行调试?

docker - 在 Gitlab Runner 容器中构建 Docker 镜像

使用 compose-file 部署 Docker 堆栈会导致类型 "bind": bind source path does not exist: 的挂载配置无效

docker - 附加到生成异常的容器

docker - Jenkins:无法从jenkins执行docker命令

java - 每个流程实例的唯一日志文件

mysql - docker-compose mysql init sql没有执行