Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java debugger can't see variables some times (often inside anonymous inner classes)

Java debugger can't see variables some times.

Proof:

enter image description here

Often this occurs inside anonymous inner classes while variable is "closure" (I know this is not exact term here). If "closure" is class member variable, I can see it if prepend with MyClass.this.myvariable, but if it is method local variable, then I can't see it at all.

Is there any way to see such variables?

like image 515
Suzan Cioc Avatar asked Apr 08 '14 11:04

Suzan Cioc


1 Answers

please check that the code you are running is in sync with code in your IDE. - you may have change code while application is running and it will change line - sometime eclipse does not run updated code, try to do clean build and restart app.

like image 105
Jigar Gajjar Avatar answered Sep 27 '22 21:09

Jigar Gajjar