Recent Posts

RSS Feeds

Remote Debugging of Tomcat

OK I posted on this several days ago. And Matt R. had the great comment that I should be using the Sysdeo plugin. I promised that I'd repost after I had time to dig into it a bit. Here is that post...

I liked the Sysdeo plugin. It works like a champ, I didn't have any frustrations like I had the last time I tried (I think it was about a year ago or so). Debugging was a snap. The down side is that it launches Tomcat inside Eclipse. That is probably not that big of a deal most of the time though so if you are doing servlet development this is probably the way to go. One other nit that will be fixed RSN is compatibility with Eclipse 3.0M6. Interestingly enough though is that M7 is supposed to run 2.1 plugins. So we will see after M7 ships (just downloaded the candidate BTW but don't have time to try out Sysdeo now).

I'm still a glutton for punishment and want to run Tomcat in a separate process (I was debugging the last of the code for the JSF Book). So I also spent some quality time messing with remote debugging. My last post was overly optimistic. I did get it running but it was the JWSDP and it was very inconsistent. The Tomcat in that package is very different than 5.0.18. Once I figured that out I switched to 5.0.18 and it worked just as described in the docs (its on port 8000 on Unixes). I like remote debugging because I don't have to wait for tomcat to startup. I can use the ant tasks included with Tomcat to hot/re-deploy. Also I don't have to worry about my memory leaking hosing Eclipse (I can easily kill tomcat and restart it if it runs out of memory) but if my app consumes all the memory I'll cause Eclipse to go off into the weeds. Much more irritating.

So if you are like me and love pain :-) you can run tomcat 5.0.18 with ${tomcat.home}/bin/catalina.sh jpda start and then setup a Debug Launch profile in Eclipse on port 8000 and then you are remotely debugging your app. Even if you don't want to do it full time its lots fun to get it working.

Permalink     1 Comment