I can not configure the debugg mode in idea for tomcat, what I did:
1) For Windows Create the file "setenv.bat" if it does not exist already. Have it in the CATALINA_HOME / bin directory. And add this to the content:
set JPDA_OPTS = "- agentlib: jdwp = transport = dt_socket, address = 9999, server = y, suspend = n" Although catalina.sh (or catalina.bat)
(and using the file setenv.bat and catalina.bat result is the same)
2) Click on Run ➝ Edit Configuration: Click on the + button on the top left ➝ Tomcat Server ➝ Remote. 
3) I start Tomcat in which Warnik is spinning 4) I launch debugg.

