12

I would like to debug the whole flow of a java program line by line and I am using eclipse how can I do that?

3
  • There's a "debug as" option right next to the "run as". It's pretty obvious. Commented Sep 24, 2013 at 9:16
  • Read this: vogella.com/articles/EclipseDebugging/article.html Commented Sep 24, 2013 at 9:16
  • How are you running your java application? Kayaman is right that there is a debugging option but the config will vary greatly. Commented Sep 24, 2013 at 9:16

3 Answers 3

7

There are multiple steps required to debug a java program in eclipse such as:

  1. Setting breakpoints
  2. Starting the debugger
  3. controlling the program execution. For line by line use F6 and F5 to step into a method
  4. Evaluating variables etc

Putting everthing here will make the answer too long. I advice you to follow this tutorial :

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

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

Comments

5

Create a break point in the first line of your main method then using F5 (step into) to walk through it.

BTW, such questions are all over the web. To be a good programmer, use google wisely.

Comments

2
  • Set the breakpoints in all the method which you want to debug
  • F3 can be used to navigate into the method
  • Then start the debugging
  • Press F5

Comments

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.