Premise: The Windows environment Tomcat is started in a catalina.bat manner rather than as a Windows service (the Java configuration and JVM parameters used vary).
Server segment Settings
Method 1: Modify
catalina_optsModify the Catalina.bat file to add:Set "Catalina_opts=-xdebug-xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"Parameter description:-xdebug: Enable debug mode
-xrunjdwp<sub-options>: Load JVM JPDA Reference Implementation Library Transport=dt_socket:socket connection, optional DT_SHMEM connect to debug server via shared memory Addre ss=8000: The debug server listens on the port server=y: is the server side, N is the client suspend=n : Whether the startup process is loading paused, Y is paused at startup, and the startup process is easy to debug
The above method only starts Tomcat when you set thecatalina_opts parameter, if you just want to temporarily modify it, you can execute it under the Command Line window and then execute startup.
Method 2: Use jpda start command-line window input: Set jpda_address=8777 (Debug port)
Catalina.bat JPDA Start
Start Tomcat to start debugging; You can save the above command as a bat file, and then open it directly when you want to debug.
Client SettingsEclipse Menu run-"Debug config-" new remote Java application,browser engineering Source, configure IP and port. Note To ensure normal debugging, be aware of the Eclipse global Java compiler option settings:
From for notes (Wiz)
Tomcat remote debugging method under Eclipse environment