Eclipse open Remote Debugging

Server configuration

 

First, catalina.sh added to this file, then the following (assuming debug port as port 8001)

CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n "

If you are using a cloud server, but also remember to configure the set of rules about safety
Here Insert Picture Description

Of course, if like me SpringBoot development, most of the time use prepackaged war package comes with Tomcat to start our service, then add parameters to the above configuration at boot time, here is my script in the nohup command. Can be seen with the above configuration is almost identical

nohup java -jar -Xdebug -
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001 /home/xudaxia/test-0.0.1-SNAPSHOT.war &

 

Eclipse configuration

 
First, open the debug configurations
Here Insert Picture Description

After that, find the Remote Java Application in the list on the left
Here Insert Picture Description
after a new debug parameters, as shown below, where I note the red circle
Here Insert Picture Description
first place, fill in the name of your project

Second place, with default options

Third, the first line of fill in the server's ip address, the second row just fill our open debug port.

At this point, we can achieve a local remote debug application server running the. (That is a bit slow ....)

Guess you like

Origin blog.csdn.net/u013568373/article/details/91624124