How to remote Java Debug Configuration in Eclipse

Source: Internet
Author: User
Tags tomcat server

In the Windows environment:

1.Modify the Startup.bat file in window and add the following at the top:

SET Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8000

Parameter description:

-xdebug: Enable debug mode

-xrunjdwp<sub-options>: Loading JVM's JPDA reference implementation Library

Transport=dt_socket:socket connection, optional Dt_shmem connect to the debug server via shared memory

address=8000: The port that the debug server listens on

Server=y: Whether it is server side, N is client

Suspend=n: Whether the boot process is loading paused, Y is paused at startup, and the startup process is easy to debug

2. Start Tomcat to see if Tomcat started successfully

If the configuration succeeds, the first sentence of the Tomcat Server console will appear as follows:

Listening for transport Dt_socket at address:8000

3, using Eclipse Debugging:

Once configured, it is the same as the local debugging step.

4. Connectivity issues that may occur:

Failed to connect to remote VM.    Connection refused. Connection Refused:connect.

Description

1, you must keep local code consistent with the remote server, otherwise there may be inconsistencies

2, port number must be accessible

How to remote Java Debug Configuration in Eclipse

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.