The principle and application of Java remote debugging

Source: Internet
Author: User

The principle of Java remote debugging is to communicate between two VMS through the debug protocol, and then to achieve the purpose of remote debugging. Between the two can be communicated through the socket.


The first time the virtual machine of the debug program to start the debug mode, start the Debug listener program.

Java-xdebug-xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n zhc_application


Zhc_application is the main program, and Server=y indicates a request to listen to the other debugclient side. address=8000 indicates that the port is 8000

Suspend indicates whether the VM is started after the debugging client establishes a connection. If y, then the current VM is suspend until the debug client connection comes in to start executing the program. If your program is not a server listening mode and executes quickly, then you can choose to block its startup by Y.


then use a The debug client goes to debug remote programs, such as the debug client with Eclipse, fill in the port number and address of the virtual machine running the Debug program, select Connect as attach.


Okay, you can start remote debugging now.


Eclipse Debug Shortcut keys:

F5 Step into

F6 Step Over

F7 Step out

F8 continue to the next breakpoint


Intellij Debug Shortcut keys

F7,step into

F8,step over

Shift+f8, Step out

ALT+F9, run to Cursor

F9, recovery program

Original: http://blog.csdn.net/hongchangfirst/article/details/44191925

Author: Hongchangfirst

Hongchangfirst's homepage: http://blog.csdn.net/hongchangfirst



The principle and application of Java remote debugging

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.