Debugging with Tomcat using Intellij 7.0.3

I went to the Run > Edit Configurations and created a Remote configuration for my Tomcat. It has -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 set and Transport is set to Socket and the Host is localhost and the port is set to 8000.

I launch the app and I set the breakpoint yet Intellij ignores the breakpoint. I am running Tomcat 5.5.26 on Linux. Is there some sort of configuration that needs to be done with respect to the catalina.sh file for Tomcat? I am starting up Tomcat with the jpda option and looking through the catalina file everything seems to be set by default. Anything retarded that I am missing?

On another note, Eclipse 3.3 Ganymeded is able to debug without any changes to Tomcat. I must obviously be doing something wrong with Intellij? Perhaps someone can shed light on my plight because I HATE using Eclipse. Lots of reasons and the biggest one is usability, performance, UI, etc etc oh wait I just gave a list....


Oh I forgot to mention when I click the debugger button it is able to connect and attach to the debugger port of 8000. yet I dont stop at the breakpoint.

And I dont know if I am incorrect but does not starting up the server like so: sh catalina.sh jpda start automatically start it in debug mode with all the defaults applied?

Edited by: Surya on Jul 9, 2008 6:41 PM

Edited by: Surya on Jul 9, 2008 6:56 PM

3 comments
Comment actions Permalink

Are you sure that the application deployed to Tomcat is up to date? IDEA doesn't support automatic redeployment for Remote Tomcat configuration.

In order to debug remote Tomcat instance you need to start Tomcat with debug parameters (e.g. by using "catalina.sh jpda start"). However you can use
Local Tomcat run configuration to start Tomcat instance from IDEA and an appropriate debug parameters will be passed automatically in such case.

I went to the Run > Edit Configurations and created a Remote configuration for my Tomcat. It has -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 set and Transport is set to Socket and the Host is localhost and the port is set to 8000.

I launch the app and I set the breakpoint yet Intellij ignores the breakpoint. I am running Tomcat 5.5.26 on Linux. Is there some sort of configuration that needs to be done with respect to the catalina.sh file for Tomcat? I am starting up Tomcat with the jpda option and looking through the catalina file everything seems to be set by default. Anything retarded that I am missing?

On another note, Eclipse 3.3 Ganymeded is able to debug without any changes to Tomcat. I must obviously be doing something wrong with Intellij? Perhaps someone can shed light on my plight because I HATE using Eclipse. Lots of reasons and the biggest one is usability, performance, UI, etc etc oh wait I just gave a list....



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Yes the app is up to date. I am not starting nor stopping nor deploying anything to Tomcat through Intellij. I am just using a remote debugging. I have started Tomcat with catalina jpda start and I have even modified the script to spit out the debug parameters it was using and its the exact same as what Intellij suggests. Intellij is even able to attach to it but it just does not stop at the breakpoint is all.

0
Comment actions Permalink

Did you try breakpoints in JSP files only or in Java files too?

Yes the app is up to date. I am not starting nor stopping nor deploying anything to Tomcat through Intellij. I am just using a remote debugging. I have started Tomcat with catalina jpda start and I have even modified the script to spit out the debug parameters it was using and its the exact same as what Intellij suggests. Intellij is even able to attach to it but it just does not stop at the breakpoint is all.



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.