Tomcat Implementation method:
Add the following setting to Tomcat's Catalina.bat file, and of course the set catalina_opts variable should be before using it. This is to set some virtual machine parameters at Tomcat startup so that the server allows remote connectivity, address=1861 represents the port number of the remote connection, and can be set to any other conflict-free port. Other application servers such as WebLogic should also be able to set these parameters, which are interesting to test.
SET Catalina_opts=-server-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,server=y,suspend=n, address=1861
That's OK, restart Tomcat, which can be started directly without having to be started in a eclipes plug-in. Open the Debug Settings window in Eclipse, select Remote Java application, create a new debug entry, enter the server IP and just set the port number, click OK to enter the debug state.