Remote debugging is when the JVM opens a tcp/ip network port which a debugger uses to communicate with the JVM. It's considered "local" debugging by IntelliJ if the program being debugged is on the same host, but the communications is still over tcp/ip ports, just internal ones.
Normally, when IntelliJ debugs a tomcat app, it launches an embedded Tomcat and connects via the debugging port. You have the option of "parking" the app to give you time to set breakpoints before actually launching it, or of going straight into the app and setting breakpoints as needed. Setting breakpoints in IntelliJ is as simple as clicking in the border area to the left of the displayed source code line. A "bullet" will appear to indicate the breakpoint. More complex breakpoints can also be made (such as only when certain tests are true), but the idea (no pun intended
) is the same.
For debugging a simple, single webapp, local debugging is enough. If you have a more complex setup, such as client-server
testing, 2 webapps running together, or other situations where more than one app is running at a time, remote debugging is required. If you look in the TOMCAT_HOME/bin directory, I think the comments on the Tomcat scripts indicate how (and on which port) to get Tomcat into remote debugging operation - you have to indicate at JVM startup if you want debugging.