Printing variables in java jdb debugger

Is it possible to view variables passed as arguments to functions if the class was compiled without debug flags? I successfully set a breakpoint on the call, but after that I do not know how to consider the meaning of the arguments. I do not have good source code, soft - suffix. A function like this: void a (int var1, boolean var2) - so I want to print var1 and print var2.

+4
source share
2 answers

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

+3
source

I am using the Eclipse Java debugger . I can view the arguments passed to the method in the Variables view.

Check out the links in this guide:

http://www.vogella.de/articles/EclipseDebugging/article.html

http://www.developer.com/java/other/article.php/2221711/Debugging-a-Java-Program-with-Eclipse.htm

-2
source

All Articles