简体   繁体   中英

debug java program step by step in Eclipse

我想逐行调试java程序的整个流程,我正在使用eclipse我该怎么做?

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

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.

  • 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM