Eclipse: Hover broken in debug perspective

2020-04-02 07:30发布

问题:

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:

alt text 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?

回答1:

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...



回答2:

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

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


回答3:

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



回答4:

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.



回答5:

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.

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.



回答6:

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