Eclipse Debug Debug

Source: Internet
Author: User

Eclipse Debug Debug Debug Java Program debugging

We can debug Java programs in the package Explorer view with the following steps:

    • Right-click the Java class that contains the main function
    • Select Debug as > Java application

The operation can also be done by shortcut keys, which are combined with ALT + Shift + D, J.

The above operation creates a new debug configuration (debug config) and uses that configuration to launch the Java application.

If the debug configuration has been created, you can select the corresponding class and click the Debug button to launch the Java app by selecting Debug Configurations from the Run menu.

The Debug menu item in the Run menu can reload a Java application that used debug mode.

The Java application shortcut key that was used in debug mode before reloading is F11.

When you use debug mode to open a Java program, the user is prompted to switch to the debug perspective. The Debug perspective provides additional views to troubleshoot the application.

The Java Editor can set breakpoints debugging. In the editor, right-click the marker bar and select Toggle Breakpoint to set the breakpoint debugging.

Breakpoints can be seen in the marker bar. You can also see it in the Breakpoints view (breakpoint views).

The JVM suspends the program when the program executes the code marked by the breakpoint, where you can view memory usage and control program execution.

When the program hangs, the debug view can check the call stack.

The variables (variable) View can view the value of a variable.

The Run menu has a resume menu item, a skip (step over) line of code, a function (step into), and so on.

The shortcut keys for Resume, step into, and step over are shown in the slices.

Eclipse Debug Debug

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.