Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat Debug

 
Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I was wondering if someone could tell me how to debug my web app.
I am using tomcat 5.5 and the latest intelliJ Idea version 6.something.
I will have to use remote debugging and have tried a couple tutorials but they do not work.

Thank you in advance for any help.
Have a great day.

Patrick
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My approach to debugging web apps is to code defensively in the first place.

I use lots of checks for important references being null or improper and throw IllegalArgumentException with some informative msg.

It is REALLLY helpful to have custom toString() methods on your classes give a clear dump of the object state.

At early stages there are plenty of System.out print lines.

It is worth the effort to make classes that do not depend directly on servlet specific APIs and can be tested outside the servlet environment.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic