I am trying to debug a jar file with attached source code. I am able to debug it step by step, but unable to see any variable values.
Can anyone help me with this?
In order to see variable values in Java bytecode, it needs to be compiled with debug symbols. A typical release version of a jar will not have this debug info.
Related: Why are some java libraries compiled without debugging information
Typically, in this case I make a debug variable in my own code before the breakpoint, something like:
...
int debugVal = libraryClass.getValueIWantToDebug();
System.out.println("Breakpoint");
...
Then you'll have the value in your own code, which will be accessible during debug.