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?
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.
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.
Long story short, JDK distributions aren't compiled with debug information.
Check the answers to these questions:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With