Pros and cons of trace debugging Trace debugging allows you to see, in a visual way, how your code is executing, and to watch the state of variables, the stack, and threads. Tools and IDEs that allow trace debugging are the preferred way to locate bugs in Java software. Not only do they make it simpler for the developer and give you a better understanding of how code works, but this method of debugging is also a more efficient way of locating errors. In these days of tight deadlines, and cutting corners, anything that can make debugging time more productive is good for you and for your users. There is, however, a downside to trace debugging.
Applications are best suited to a trace debugger, and to a limited degree, applets.
When you can't use a debugging tool, the next best solution is to use logging. The concept of a log is nothing new. Applications have used log files for decades to record transactions and to make note of abnormal situations and irregularities. Unfortunately, when you're trying to locate a bug, just knowing that an error occurred probably isn't going to be very useful. You need to know why it occurred, what events precipitated it, and which section of code was at fault.