Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not working - Hover on variable to see value in debug prespective in Eclipse

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?

Thanks!

like image 316
troy Avatar asked Feb 17 '11 19:02

troy


People also ask

How can I see the variable value while debugging in Eclipse?

Press Ctrl+Shift+d or Ctrl+Shift+i on a selected variable or expression to show its value. You can also add a permanent watch on an expression/variable that will then be shown in the Expressions view when debugging is on.

How do I show variables in debug mode?

The most commonly used way to look at variables is the DataTip. When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable.


1 Answers

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.

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.

like image 63
Swatantra Kumar Avatar answered Oct 14 '22 09:10

Swatantra Kumar