不工作 - 将鼠标悬停在变量上以查看 Eclipse 中调试方面的值

2022-01-22 00:00:00 debugging variables hover eclipse

我使用的是经典的 Eclipse 3.6.1.我有一个 Java 项目由于堆栈溢出而引发异常.与其他编辑器不同,当我将鼠标指针悬停在变量上时,它不会显示该变量的值.这是

I am using classic Eclipse 3.6.1. I have a Java project which is throwing an exception because of a stack overflow. Unlike other editors, when I hover my mouse pointer on a variable it does not show me the value of that variable. Here are the settings in

Window->Preferences->Java->Editor->Hovers
Combined Hover - Shift
Variable Values - Ctrl
Source - Shift+Ctrl

但这似乎不起作用.我已经看到其他人关于这个问题的线程,但找不到解决方案.这是一个尚未修复的错误吗?

But this doesn't seem to be working. I have seen threads by others about this same problem but could not find a solution. Is this a bug that hasn't been fixed yet?

谢谢!

推荐答案

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

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

Is "Combined Hover" selected? Uncheck it; apply; close the window; restart debugging session; go back; check it again; apply.
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.

通过重命名包,问题得到修复".

The problem gets "fixed" by renaming the package.

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

For whatever reason, this refactoring triggers 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.

相关文章