Sometimes when I am debugging code in Eclipse it happens that although I can see and inspect class member variables without any difficulty I am unable to inspect the values of variables declared locally within functions. As an aside, any parameters to the current function lose their 'real' names and instead one sees their values listed in the Variables window as arg0, arg1, arg2, etc but at least the values are visible.
This is occurring at present in relation to classes defined within the core JDK. I have verified that the installed and current JRE is a JDK.
Is anybody able to shed some light on this behaviour?
Invoking Java main method with parameters from Eclipse
Headless Eclipse Build returns ERRORLEVEL 13
With multi-module Maven projects, is it possible to make my root (pom-packaged) project available in Eclipse?
the rt.jar that ships with the JDK (where the core Java classes live) is not compiled with full debug information included in the .class files, so the debugger does not have local variable info..The release notes of Eclipse 3.4 states:.
Editor templates for defensive programming
Unfortunately, this is not something that Eclipse can do anything about - all debuggers will have the same problem with JDK core classes..
Are there any decent Perl plugins for Eclipse?
In Eclipse, what can cause Package Explorer “red-x” error-icon when all Java sources compile without errors?
Missing debug attributes
Eclipse + PDT performance tips?
The debugger requires that class files be compiled with debug attributes if it is to be able to display line numbers and local variables.
outputting the value of a “Watch” in Eclipse to a log file
Quite often, class libraries (for example, "rt.jar") are compiled without complete debug attributes, and thus local variables and method arguments for those classes are not visible in the debugger.
It's very simple: just use javac and jar from your JDK..
mkdir \tmp; mkdir \tmp\out
src.zipin JDK installation directory to
find -name *.java > files.txt
javac -verbose -g -d \tmp\out -J-Xmx512m -cp "<jdk>\jre\lib\rt.jar";"<jdk>\lib\tools.jar" @files.txt
cd \tmp\out; jar cvf rt.jar *
<compilerarg line="-g" />in javac.
It generated rt.jar.
Replaced rt.jar of JRE.
(Don't forget to keep a backup).. Now I am able to watch, inspect local variables of any class in rt.jar during debug in eclipse..