Eclipse:在调试角度悬停中断

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1730628/
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-09-19 14:08:58  来源:igfitidea点击:

Eclipse: Hover broken in debug perspective

javaeclipsedebugginghover

提问by zanussi

Since upgrading Eclipse (Galileo build 20090920-1017), hover in debug no longer displays a variable's value. Instead, hover behaves as if I were in normal Java perspective:

自从升级 Eclipse(Galileo build 20090920-1017)后,在调试中悬停不再显示变量的值。相反,悬停的行为就像我在普通的 Java 视角中一样:

alt text http://michaelzanussi.com/wp-content/uploads/2009/11/debug_hover.png

替代文字 http://michaelzanussi.com/wp-content/uploads/2009/11/debug_hover.png

I've tried cleaning the project, re-importing it, etc., all to no avail. Anything I'm missing here?

我试过清理项目,重新导入它等,但都无济于事。我在这里缺少什么吗?

采纳答案by Dale77

I went to Window - Preferences - Java - Editor - Hovers, hit "Restore Defaults" and "Apply" and that fixed it for me, even though nothing actually changed in the settings...

我去了窗口 - 首选项 - Java - 编辑器 - 悬停,点击“恢复默认值”和“应用”并为我修复了它,即使设置中没有实际改变......

回答by ChssPly76

Go to Window - Preferences - Java - Editor - Hovers.

转到窗口 - 首选项 - Java - 编辑器 - 悬停。

  1. Is "Combined Hover" selected? Uncheck it; apply; close the window; restartdebugging session; go back; check it again; apply.
  2. If the above doesn't help, you can check "Variable Values" option and specify a modifier key for it. Not as convenient as "combined", but should work.
  1. 是否选择了“组合悬停”?取消选中它;申请; 关上窗户;重新启动调试会话;回去; 再次检查;申请。
  2. 如果以上没有帮助,您可以检查“变量值”选项并为其指定一个修饰键。不像“组合”那样方便,但应该有效。

回答by Charles

I had this problem too once, I "just" had to restart eclipse, after that the hover mechanism worked again.

我也遇到过这个问题,我“只是”不得不重新启动 eclipse,之后悬停机制再次起作用。

回答by Evan

I had a similar issue and when I came across this question. My problem was that windows hover time was set to 20s or so (you can test if this is your problem by putting the mouse on a mistake and waiting for a min or so). The registry key "MouseHoverTime" was set to a large value of 200000 ms (normally 400). Fix it by going to start -> run -> "regedit" -> HKEY_CURRENT_USER\Control Panel\Mouse double click "MouseHoverTime" and setting it back to 400.

我有一个类似的问题,当我遇到这个问题时。我的问题是 Windows 悬停时间设置为 20 秒左右(您可以通过将鼠标放在错误上并等待一分钟左右来测试这是否是您的问题)。注册表项“MouseHoverTime”设置为 200000 毫秒(通常为 400)的大值。通过开始 -> 运行 -> “regedit” -> HKEY_CURRENT_USER\Control Panel\Mouse 双击“MouseHoverTime”并将其设置回 400 来修复它。

I think this had been done on my computer a while back to prevent hover popups in another program. Anyway, sorry that my answer doesn't directly apply to this question, but I'm hoping it'll help somebody like me that comes across this thread with a similar issue.

我认为这已经在我的计算机上完成了一段时间,以防止另一个程序中的悬停弹出窗口。无论如何,很抱歉我的回答并不直接适用于这个问题,但我希望它会帮助像我这样遇到类似问题的人。

回答by Fading

For C++ project, please add -ggdb -0g to the compiler option. Hope this solution can help eveyry C++ programer face with the same issue.

对于 C++ 项目,请在编译器选项中添加 -ggdb -0g。希望这个解决方案可以帮助每一位 C++ 程序员面对同样的问题。

回答by zanussi

The problem was "fixed" by renaming the package.

通过重命名包来“修复”问题。

For whatever reason, this refactoring triggered something in Eclipse, and immediately I was able to view variable values during debugging. Also, when I go back into Preferences under Hovers, I can now see the "Variable Values" option.

无论出于何种原因,这种重构在 Eclipse 中触发了一些东西,我立即能够在调试期间查看变量值。此外,当我回到悬停下的首选项时,我现在可以看到“变量值”选项。