Java 使用 Eclipse 远程调试器抛出 com.sun.jdi.InternalException

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/295686/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 12:42:14  来源:igfitidea点击:

Using the Eclipse remote debugger throws com.sun.jdi.InternalException

javaeclipsedebugging

提问by

The following error is being thrown:

正在抛出以下错误:

com.sun.jdi.InternalException: Got error code in reply:35 occurred while retrieving value. for all expressions

I am getting this error for all expressions and cant find anything on it. My guess is that the debugger isn't correctly connecting to the remote version, but I am not sure.

对于所有表达式,我都收到此错误,但找不到任何内容。我的猜测是调试器没有正确连接到远程版本,但我不确定。

回答by VonC

Just to be sure: are you remote debugging some instrumented code ?

只是为了确定:您是否远程调试了一些已检测的代码?

Because there seem to be some problems with JProfiler...

因为JProfiler好像有些问题...

回答by VonC

I am not sure but I have got this plenty of times. It comes when I debug the application, and I think it occurs when the debugger tries to wrap a exception which arises due to code. At one instance while debugging when I see the logs I get some business exception, but while debugging it gave me com.sun.jdi.internalexception.

我不确定,但我已经得到过很多次了。它是在我调试应用程序时出现的,我认为它发生在调试器试图包装由于代码引起的异常时。在调试时,当我看到日志时,我得到了一些业务异常,但在调试时它给了我com.sun.jdi.internalexception.

Yes I do remote debugging the servers JVM so it could also be beacuse the debugger isn't correctly connecting to the remote version as you pointed out

是的,我对服务器 JVM 进行远程调试,因此也可能是因为调试器没有正确连接到您指出的远程版本

回答by Shri

I have also faced with same issue on local server. But, it was the issue of forloop. I was using:

我在本地服务器上也遇到了同样的问题。但是,这是for循环的问题。我正在使用:

for(Object obj: list)
{
    for(Object obj2 : list)
    {}
}

When I replaced that code by simple for loop (index based), it resolved the above issue. I think for each loop not able to iterate another list of same Type in same loop. Work around for this is replace that for loop to index based for loop.

当我用简单的 for 循环(基于索引)替换该代码时,它解决了上述问题。我认为对于每个循环无法在同一个循环中迭代另一个相同类型的列表。解决这个问题是将 for 循环替换为基于索引的 for 循环。

回答by Yeti

It looks like the problem is related to the new debug feature "Show method result after a step operation": See the thread Eclipse Oxygen - Debugging Issueon the Eclipse forum:

看起来问题与新的调试功能“在步骤操作后显示方法结果”有关:请参阅Eclipse 论坛上的线程Eclipse Oxygen - Debugging Issue

The workaround is to go to Preferences -> Java -> Debug and disable the option "Show method result after a step operation (if supported by the VM; may be slow)".

解决方法是转到 Preferences -> Java -> Debug 并禁用选项“在步骤操作后显示方法结果(如果 VM 支持;可能会很慢)”。

See also the bug report in the Eclipse Bugzilla Bug 531706 - Oygen.2 com.sun.jdi.InternalException: Got error code in reply:35 while debugging

另请参阅 Eclipse Bugzilla 中的错误报告Bug 531706 - Oygen.2 com.sun.jdi.InternalException: Got error code in reply:35 while debugging

回答by f10orf12

If you have the "Logical Structures" turned on in the Expressions tab while debugging, this seems to still cause issues even in Eclipse IDE version 4.11.0. Turning it off helped me. It is not a "solution" per serather a work-a-around.

如果您在调试时在 Expressions 选项卡中打开了“Logical Structures”,即使在 Eclipse IDE 版本 4.11.0 中,这似乎仍然会导致问题。关闭它对我有帮助。它本身不是“解决方案” 而是一种解决方法。

See the Eclipse Bug 48815

请参阅Eclipse 错误 48815

回答by Josh Withee

Work-around: Uncheck this box:

解决方法:取消选中此框:

enter image description here

在此处输入图片说明