8

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.

2 Answers 2

8

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

Sign up to request clarification or add additional context in comments.

Comments

-2

I use Eclipse Java debugger. I am able to view arguments passed to method in "Variables" view.

Checkout this tutorial links :

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

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

3 Comments

I don't have source code, only compiled(without debug option) class. I try eclipse and can't find how to debug without source there.
You can use some decompiler like JAD , to get sources. You can install Jode plugin on eclipse for decompiling.
why negative marking ??? as per stackoverflow ethics one needs to give reason for same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.