Debugging Techniques
Sometimes you can figure out an error just from the symptoms; other times, you must interact with the program or the system to see what's going on. Some of these techniques just re quire a little patience, although others require you to exercise an unusual number of brain cells.
Using a Debugger
Obviously, if you're debugging a program, the first thing that leaps to mind is to use a debugger. For small, standalone programs, a debugger is probably the best way to locate a problem. Even for more complicated programs—servlets, EJBs, even Java Server Pages—you can often use a debugger to step through the code. It might be a little tougher to set up the debugger at first, but after you get it going, it can save you many hours ...
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.