Eclipse Remote Debug

Source: Internet
Author: User

"Environment Parameters"

Eclipse:version:mars.2 Release (4.5.2)

Linux:centos 6.5

Brief

Java itself supports debugging, and provides a simple debugging tool--jdb, similar to the powerful Gdb,jdb is also a character interface debugging environment, and support set breakpoints, support thread-level debugging.

"Concrete Steps"

1. In the process startup parameters on the server, add:

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

Connect to the debug service provided by myhost:6666

-xdebug is a notification that the JVM is working in debug mode,

-XRUNJDWP is to inform the JVM to use (Java Debug wire protocol) to run the debugging environment. This parameter also has a series of debugging options:

Transport specifies how the debug data is routed

Dt_socket refers to using the socket mode

server=y/n whether the VM needs to be executed as a debug server.

suspend=y/n whether to start the VM after the debugging client establishes a connection.

Start the service side

2. Debugging the Client

Set Debug configurations-->remote Java application

Attention:

Before clicking the "Debug" button, be sure to " start the program ", otherwise it will appear

"Failed to connect to remote VM. Connection refused "exception, as shown in.

3. Click Debug, the effect is as follows, next, and local debugging exactly the same.

Requires an HTTP client-initiated request, such as the poster plugin for Firefox, or JUnit's test cases, and so on.

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