

Make sure that you have the sources for the code that you are trying to debug in your IDE.Make sure that Tomcat is started in remote debugging mode as described above and that your app is deployed.We are also going to assume that you have some idea of what a debugger is and how to use one. If not then that is really outside the scope of this topic and you need to go to and read up on how to use your IDE, and maybe practice a little bit before you come back to this.


This answer assumes that you have a project set up and have some idea of what you are doing in this respect. How do I remotely debug Tomcat using Eclipse? Whilst this is very useful in development it should not be used in production because of both security and performance implications.

Doing this will cause the JVM to pause execution very early in the launch process and wait until a debugger is attached before proceeding. If you need to debug Tomcat startup or the auto-deployment of an application (where a breakpoint set in a debugger would be reached before you have time to connect with the debugger), then set the parameter suspend=y instead of suspend=n. The port does not need to be set to 8000, it may be any value appropriate for your system. If you start Tomcat from within an IDE, check the documentation for the IDE to determine how to set the required JVM options.Check the documentation for the service wrapper to determine how to set JVM options. If you run Tomcat using service wrapper, add the above JVM options before any other JVM options.bat file for details.įor example, the port number and JPDA transport implementation can be set with JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket. See the comments at the top of catalina.sh or. The above mentioned options can be provided by setting certain environment variables. It will start Tomcat so that a remote debugger can be connected to port 8000.
