Xdebug停止工作并且无法在断点处停止

时间:2019-10-11 06:29:24

标签: php phpstorm xdebug

昨天调试器无故停止工作。我使用PhpStorm IDE进行调试。我在页面的开头放置了断点,但断点并没有停止。

我尝试用相同的PHP版本调试控制台脚本,并且运行良好-调试在断点处停止。我在Apache服务器上更改了php版本,并在另一个项目上尝试了degguning-它工作正常,调试在断点处停止。

PHP版本 5.6.40-12 + ubuntu18.04.1 + deb.sury.org + 1

/etc/php/5.6/apache2/conf.d/20-xdebug.ini

zend_extension=xdebug.so
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.scream=0
xdebug.show_local_vars=1
xdebug.idekey=PHPSTORM
xdebug.remote_enable=1
xdebug.remote_log='/val/log/xdebug.log'

**xdebug version**: 2.5.5 xdebug_config_1

xdebug_config_2

PhpStorm 2019.2.3 版本号PS-192.6817.20,于2019年9月25日建立 运行时版本:11.0.4 + 10-b304.69 amd64 VM:JetBrains s.r.o的OpenJDK 64位服务器VM Linux 5.0.0-27-通用

在调试开始时,PhpStorm日志中有警告。也许有帮助:

2019-10-07 15:51:33,188 [25325256]   WARN - il.connection.ServerConnection - input stream is finished 
java.io.IOException: input stream is finished
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.readDocument(DbgpUtil.java:115)
    at com.jetbrains.php.debug.xdebug.dbgp.DbgpUtil.readMessage(DbgpUtil.java:283)
    at com.jetbrains.php.debug.xdebug.connection.XdebugConnection$MyInputReader.read(XdebugConnection.java:135)
    at com.jetbrains.php.debug.xdebug.connection.XdebugConnection$MyInputReader.read(XdebugConnection.java:124)
    at com.jetbrains.php.debug.xdebug.connection.XdebugConnection.init(XdebugConnection.java:47)
    at com.jetbrains.php.debug.connection.PhpDebugServer.handle(PhpDebugServer.java:51)
    at com.jetbrains.php.debug.connection.PhpDebugServer.handle(PhpDebugServer.java:34)
    at com.jetbrains.php.util.connection.ServerConnection.lambda$null$0(ServerConnection.java:64)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

如何解决问题,如何强制Xdebug在断点处停止?

1 个答案:

答案 0 :(得分:3)

从错误消息中,我可以看到调试会话确实起作用。 PhpStorm似乎中止了连接。

Xdebug可能正在发送PhpStorm无法理解的XML(即无效)。我怀疑是由于属性名称或数组键名称中的字符为空。 (随时将完整日志发布到pastebin中,我很乐意查看并修改答案)。

您已经在创建远程日志文件,因此请查看调试会话中止后的最后几行,恰好

您可以通过将Xdebug升级到受支持的版本(当前为2.7.2)来解决此问题。

相关问题