Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print variables in java jdb debugger

Is it possible to view variables, passed as arguments in function, if class was compiled without debug flag? I successfully put breakpoint on call, but after that i don't know how to view arguments value. I don't have good source code, soft is obsuficated. Function like this: void a(int var1, boolean var2) - so, i want print var1 & print var2.

like image 631
cdump Avatar asked Sep 05 '10 08:09

cdump


1 Answers

Compile code with javac -g MyClass.java. This will allow you to watch local variables when using jdb MyClass

like image 101
newJ Avatar answered Nov 01 '22 08:11

newJ