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. enter image description here

enter image description here

3) I start Tomcat in which Warnik is spinning 4) I launch debugg.

output: enter image description here

  • Look here for a solution to a similar problem. - Vladimir Glinskikh
  • Or maybe just 9999 port is busy? - Andrew Bystrov
  • I tried different ports - ketchyn

1 answer 1

I do it like this:

  1. I launch Tomcat with the command ./catalina.sh jpda start or. \ Catalina.bat jpda start for Windows
  2. In Idea I create a new Run / Debug configuration with type "Remote"
  3. In the settings you need to register the correct host and fix the port to 8000 (debug port by default at Tomcata).

And actually everything. You can connect. It also works on the Community version.

  • in my case, change set JPDA_OPTS = "- agentlib: jdwp = transport = dt_socket, address = 9999, server = y, suspend = n" to set JAVA_OPTS = -Xdebug -Xrunjdwp: transport = dt_socket, address = 9999, suspend = n , server = y - ketchyn