My number one suggestion for debugging in JSP or servlets is to put all the working code in "helper" classes that can be tested and debugged OUTSIDE the servlet/jsp environment.
There are so many things that can go wrong when you plunk totally untested code into a jsp/servlet container that it is hard to conduct intelligent debugging. Just browsing through recent posts will convince you of that.
With WebSphere Studio Application Developer, or IBM's Rational Application Developer (IRAD), you can set breakpoints in Java code in a JSP and step through your code at runtime. It's an invaluable service.
Having said that of course, there is great value in minimizing the amount of code in a JSP. Factore out logic into custom tags or Java classes which are easier to maintain, reuse, and debug.