Start Tomcat as a Windows service in the debug mode

From the tomcat/bin directory, start the tomcat exe or right click it to get to the properties. In the properties dialog, click the Java tab and BEFORE all of the -D options, add something like this:

-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998

Make sure they are first on the list and each in their own line.

From then on, Tomcat should start in the debug mode and you can connect via remote debug configuration in any IDE (IntelliJ, Eclipse…).