How to use the Debug feature of Eclipse (from Baidu Experience)

Source: Internet
Author: User

  1. First open Eclipse, open the Java source file
  2. Steps to read
  3. 2

    Double-click on the line number column to the left of the line of code you want to test, create a breakpoint, double-click again to cancel the breakpoint

    Steps to read
  4. 3

    Then right-click on Debug As-java application, (note, not select Run as)

    Start Debugging Java programs

    Steps to read
  5. 4

    There may be a popup box (indicating whether to enter the Debug view) Click OK

    The debug view is then performed,

    Steps to read
  6. 5

    The upper left is the entire normal thread execution, and the upper right side is a list of line numbers that just set the breakpoint.

    There are several buttons on the upper left to note

    Steps to read
  7. 6

    These buttons are the control buttons that we debug, respectively:

    Step into (shortcut key F5) enters the method of the current line, steps through

    Step return (shortcut key F7) Returns the method that was executed in the previous step (relative to F5)

    Step Over (shortcut key F6) executes the current line but does not enter execution details

    Resume (shortcut key F8) resumes execution, indicating that the code executes and jumps directly to the next breakpoint

    Terminate Stop Debugging

    Steps to read
  8. 7

    Common debugging methods: Press F8 to jump to the next breakpoint execution if you need to query execution details F5F6F7, etc.

      1. 8
      2. To cancel a breakpoint: Deselect or delete the current breakpoint in the list of breakpoints in the upper right

How to use the Debug feature of Eclipse (from Baidu Experience)

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.