To configure a remote Linux server:
1, modify tomca/bin/startup.sh, the first line to add:
declare -x CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"
Where address=9999 is the port number that is not being used. There are two ways to connect, for Dt_shmem and Dt_socket, respectively, for native debugging and remote debugging.
2. Check to see if the server's corresponding port has been monitored:
netstat - antp | grep 9999
If the actual corresponding port has been monitored by Java, it succeeds. Otherwise, try to change the port number, or see if the corresponding Tomcat configuration is correct.
Local Configuration:
1. Open the menu Run>debug configutions.
Right-click:
In project, select the project you want to debug, enter the IP that requires the remote debugging project in Host, the IP where Tomcat is located, enter the port number set in port, such as the 9999set above, and then tick "allow Termination of remote VMS ", click" Apply ".
Then, start the server.
Select a well-configured run>debug configutions locally. Choose your own configuration of the information, Debug. Place a breakpoint at the point where you need to debug. Normal execution, which can be debugged locally when running to a breakpoint.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Tomcat Remote Debugging