Remote debugging Java programs with Eclipse JPDA

Source: Internet
Author: User

Please follow the steps below (I have successfully debugged in the Eclipse 3.2, JDK 1.5_08) environment.

1. When you start the Java program, in the Java startup command, add the following parameters

-xdebug-xrunjdwp:transport=dt_socket,address=1234,server=y,suspend=n

Note: The suspend parameter indicates whether to wait for the JPDA debug end to connect when starting. n indicates no

2. After configuration, you can run the Java program, see the following prompts to indicate that the debug function has been turned on

Listening for transport dt_socket at address:1234

3. Open eclipse, in menu "Run"-> "Debug ..." Pop-up dialog box, select Remote Java application, new Debug Configuration

* Project is the program source code project that is running

* Host,port Host: The port where the IP port where the running Java program resides is set in the Java Run command

4. Complete, run debug directly. Next, the same method as debugging a local program.

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.