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
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
After that, find the Remote Java Application in the list on the left
after a new debug parameters, as shown below, where I note the red circle
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 ....)