Debug Programs in eclipse

Source: Internet
Author: User

How to Use the debug debugging program in eclipse?

The most basic operations are:
1. Set a breakpoint in a Java file and run it. When the Program reaches the breakpoint, it will go to the debug view,
2. Both F5 and F6 are single-step debugging. F5 is step into, that is, the code is executed, and F6 is step over,
That is, execute the code of this line and jump to the next line,
3. F7 is a jump function.
4. F8 is the last execution.

//////////////////////////////////////// ////////
1. Step into (also F5) Jump
2. Skip step over (also F6)
3. Step return (also F7) after executing the current method, return jumps out of this method
4. Step filter: gradually filter and execute until unfiltered locations or breakpoints are encountered (set filter: window-preferences-Java-debug-step filtering)
5. Resume re-runs debug and runs until it encounters a breakpoint
6. hit count: Set the execution times to be appropriate for the for loop in the Program (Set breakpoint view-right-click hit count)
7. Inspect check operation. Execute an expression to display the execution Value
8. Watch monitors variable changes in real time

9. We often say that the breakpoint refers to line breakpoints. In addition to line breakpoints, there are other breakpoint types: field (watchpoint) breakpoint, method breakpoint, and exception breakpoint.
10. Field breakpoint is also called watchpoint. It is temporarily suspended when the member variables are read or modified.
11. Run-method breakpoint)
12. When exception breakpoint is added to catch execption (To be continued ...)
Breakpoint attributes:
1. How many times of hit count execution will be suspended for Loop
2. When enable condition meets your input conditions (true/change), it will be suspended temporarily.
3. This thread is temporarily suspended when suspend thread is multithreading.
4. The suspend VM is temporarily attached to the VM.

13. variables in the variables view can change the variable value. In the variables view, right-click the variable and choose change value. One time for quick debugging.
14. After some code is modified during the debug process --> Save & build --> resume from the breakpoint
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.