Debug Spring MVC application deployed in Tomcat server with IntelliJ IDEA Community Edition on Linux & Windows

Saurabh Gangamwar
2 min readSep 3, 2020

--

Start Tomcat in Debug Mode

The startup script for Tomcat is named catalina.sh (catalina.bat on Windows). To start a Tomcat server with debug enabled we need to prepend jpda to the arguments. run the following commands to start the tomcat in debug mode.

on Linux

catalina.sh jpda start

on windows

catalina.cmd jpda start

The default debug arguments will use a network socket listening on port 8000 .

Debug In Intellij

Select Edit Configurations

Add Template from Remote

Make sure the port number is 8000 & Select classpath for you project
Click on debug button. It will connect to the tomcat server

Now Attach Breakpoints and enjoy debugging 😉

--

--

Saurabh Gangamwar
Saurabh Gangamwar

Written by Saurabh Gangamwar

Full stack developer @Stryker. Loves building SAAS products using @angular ❤ @nestJs 🚀 @mysql

No responses yet