Eclipse Remote Debug

Source: Internet
Author: User

First, the service side settings

1, the first way

Enter the bin directory and execute:./catalina.sh JPDA Start

if[" $"="JPDA"] ; Then  if[-Z"$JPDA _transport"]; ThenJpda_transport="Dt_socket"  fi  if[-Z"$JPDA _address"];Then 
# Portjpda_address="8686" fi if[-Z"$JPDA _suspend"]; ThenJpda_suspend="N" fi if[-Z"$JPDA _opts"]; Thenjpda_opts="-agentlib:jdwp=transport= $JPDA _transport,address= $JPDA _address,server=y,suspend= $JPDA _suspend" ficatalina_opts="$CATALINA _opts $JPDA _opts" Shiftfi

Because the catalina.sh script has the above command, you can start with the command directly.

2, the second way

Configure the following parameters in the catalina.sh script:

Java_opts= "-xdebug-xrunjdwp:transport=dt_socket,address=8686,server=y,suspend=n"

Then go to the Bin directory and execute directly:./startup.sh

Parameter description:

-xdebug is to notify the JVM to work 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.

Second, Eclipse configuration debug

1. Open debug Debug Configurations in Eclipse, set the remote IP and port to be debugged, as below.

Port fill in the corresponding port of your modified jpda_address, then click Debug to be able to debug remotely.

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.