Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why debugging jdk libraries in eclipse, I can't see local variables values?

The problem is that while debugging java library classes, e.g. HashSet functions I cant see local variables. On variables tab I can only see function parameters and this's fields. When I'm trying to add local variable to watch, eclipse says: "errors during evaluation".

So my question is why does this happens? And how can I see those local variables values?

like image 804
dhblah Avatar asked Jul 12 '12 12:07

dhblah


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

Long story short, JDK distributions aren't compiled with debug information.

Check the answers to these questions:

  • How to debug JDK source
  • How can I check on debug symbol status with Eclipse?
like image 61
Francisco Paulo Avatar answered Sep 27 '22 17:09

Francisco Paulo