Idea Remote Debug tomcat is simple and configured as follows:
1. Modify the Tomcat server configuration
Open tomcat/bin/catalina.sh
Add the following parameters in the blank Space
Catalina_opts= "-xdebug-xrunjdwp:transport=dt_socket,address=xxx.xxx.xx.xx:60222,suspend=n,server=y"
description : Address for the Tomcat server IP addresses, which must be filled in (if the LAN IP, the LAN IP, if not filled with IP, may start with 127.0.0.1 this loopback address, resulting in debug failure). The port number is freely defined and is not occupied.
When you are finished adding, save your changes.
Start Tomcat in a catalina.sh way
SH catalina.sh start
At this point, the server-side configuration is complete
2.IDEA Configuration
The first step, Edit configurations
Step two Add New Configuration >> Tomcat Server >> Remote
The third step, modify the configuration,
Fourth step, click Startup/connection >> Debug, modify the port set for the first step, here is the 60222
The fifth step, debug start Idea Tomcat, the console print the following information, it means that the startup is successful, you can start remote debugging
Tomcat Remote Debug configuration teaches you to remotely debug code to resolve online failures