Linux&windows Implement eclipse remote debugging tomcat application __linux

Source: Internet
Author: User

Original address: http://blog.csdn.net/afgasdg/article/details/9236877 According to my personal preferences to do a bit of adjustment.
Configure Tomcat to enable remote debugging

Linux configuration:

To modify the/usr/local/tomcat/bin/catalina.sh file:

Catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Windows configuration:

To modify the $tomcat_home/bin/catalina.bat file:

Set "Catalina_opts=-xdebug-xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

As shown in figure:

============== parameter Description: =====================

-xdebug: Enable debug mode

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

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

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

Server=y: Is the server side, N is the client

Suspend=n: The boot process does not load pause, Y is paused during startup, easy to debug the startup process

Test startup Tomcat:

Linux startup:./catalina.sh Run

Windows Startup: Direct Double-click Catalina.bat
Eclipse Debugging Remote Tomcat application


When you click Debug, you can debug.

The rest is the same as normal debugging, and breakpoints are added directly to the source code. Remote VM connection denied issue

Failed to connect to remote VM. Connection refused.

Connection Refused:connect.


The situation that appears as shown in the picture may be that a connection has been established.

Workaround: Go to the debug perspective,

Find the Click to disconnect the link, you can solve the problem.

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.