docker - PhpStorm not displaying xdebug as stopped on breakpoint (docker)
问题描述
So I have my webserver container happily running xdebug, and I have xdebug.remote_log setup so I could diagnose the issue. If I place a breakpoint on the first line phpstorm behaves as expected, it breaks, gives you the normal options. But if you allow it to continue running past that point phpstorm has the appearance that the code is timing out, it just hangs. However if I read the xdebug remote_log during this time, it reports that it has successfully hit the next breakpoint I set and is waiting there, phpstorm shows the code as executing.
Here are some screenshots of configs and such:
php.ini
settings > languages & frameworks > php > Debug
settings > languages & frameworks > php > Servers > localhost (docker) aka my only added server
Screenshot from the end of xdebugs remote_log. From the public/index.php initial breakpoint I then allowed it to run. And then here it states it broke in ListController.php which is the correct location for the next placed breakpoint. As you may have guessed from the previous image, in docker the repo is in /srv/www while on my local its in /home/myname/Development/projectName/checkout.
xdebug remote_log: https://pastebin.com/faiQqwMT
some code so stackoverflow will let me link the log
The only interesting part of my idea.log
2018-10-12 10:18:23,772 [81267328] ERROR - plication.impl.ApplicationImpl - Argument for @NotNull parameter 'remoteFileUrl' of com/jetbrains/php/debug/xdebug/debugger/XdebugDriver.onBreak must not be null java.lang.IllegalArgumentException: Argument for @NotNull parameter 'remoteFileUrl' of com/jetbrains/php/debug/xdebug/debugger/XdebugDriver.onBreak must not be null at com.jetbrains.php.debug.xdebug.debugger.XdebugDriver.$$$reportNull$$$0(XdebugDriver.java) at com.jetbrains.php.debug.xdebug.debugger.XdebugDriver.onBreak(XdebugDriver.java) at com.jetbrains.php.debug.xdebug.debugger.XdebugDriver$4.onResponse(XdebugDriver.java:172) at com.jetbrains.php.debug.xdebug.debugger.XdebugDriver$4.onResponse(XdebugDriver.java:167) at com.jetbrains.php.debug.connection.PhpDebugConnection.handleInput(PhpDebugConnection.java:256) at com.jetbrains.php.debug.connection.PhpDebugConnection.lambda$startReading$2(PhpDebugConnection.java:290) at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
解决方案
这是一个已知的错误:https ://youtrack.jetbrains.com/issue/WI-43622 。切换回 XDebug 2.6 应该可以修复它。
推荐阅读
- opencv - 如何确定图像中的物体是平面还是非平面?
- node.js - 在 Node 服务器的 Mailgun 模板中使用变量
- firebase - 并发文档创建/删除时,firestore 事务是否会再次运行?
- angular-cli - Keycloak 应用程序中的 Service Worker 操作
- puppeteer - Target.sendMessageToTarget 已弃用——我现在如何使用 devtools 协议的扁平化风格?
- javascript - 循环形式的 AJAX 请求
- reactjs - Framer Motion:与父子动画冲突
- ajax - 使用ajax时如何获取数据表中列的所有数据
- function - 如果语句不评估
- javascript - 组件在接收到数据之前就渲染