Eclipse Remote Debug Java program

Source: Internet
Author: User
Debugging Java programs remotely using Eclipse JPDA



This article describes the use of Eclipse JPDA to debug a remotely running Java program in the Eclipse development environment.

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

1. When starting 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 side to connect at startup. n indicates no

2. After the configuration, you can run the Java program, see the following prompt, indicating that the debug function has been turned on
Listening for transport dt_socket at address:1234

3. Open Eclipse, in the menu "Run", "Debug ..." Pop-up dialog box, select Remote Java application, new Debug Configuration
* Project is a running program source code project
* Host,port Host: The port where the Java program is running in the IP port set in the Java Run command

4. Complete, run debug directly. Next, the same method is used to debug the local program.



Good luck!
Yours matthew!

Transferred from: http://www.blogjava.net/xmatthew/archive/2009/08/08/290331.html

Eclipse Remote Debug Java 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.