Eclipse remote debugging Java program

Source: Internet
Author: User

Today, my colleague asked me how to remotely debug JavaProgram. I don't know. Search now. Just add data in the program at the height. Then, it is too convenient to specify the Port during eclipse debugging.

For example, there isCode:

Export this Java as a remoting-debug.jar to upload to the target machine (of course local ). Then run the following command on the target machine:

 

 
Java-xdebug-xrunjdwp: Transport = dt_socket, Server = Y, address = 8000-jar remoting-debug.jar

 

The following error occurs: listening for transport dt_socket at address: 8000.

The program is waiting for debugging.

Right-click the remotingdebug code in eclipse-> debug as...-> debug configurations..., and double-click Remote Java application, for example:

192.168.1.100 is a local virtual machine. The debugging is convenient.

Extension: Eclipse remote debugging Tomcat program.

You can add JPDA at the end of startup. BAT in Tomcat 6, as shown below:

 

SetJpda'address = 8017
Call"% Executable %" JPDAStart% __Line_args %

 

If you do not need to set jpda_address = 8017, the default port 8000 is used.

Related Words:

    • Jdi-Java debug Interface)
    • Jdt-Java Development Tools)
    • Jdwp-Java debugging network protocol (Java debug wire protocol)
    • JPDA-Java platform debugger architecture (Java platform debugger Architecture)
    • JVM-Java Virtual Machine)
    • Jvmdi-JVM debug Interface)
    • Jvmti-JVM tool interface)
    • VM-Virtual Machine)

      Reference: http://www.ibm.com/developerworks/cn/opensource/os-eclipse-javadebug/

 

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.