ASP debug tracing is limited to the following three methods:
Implement debug tracing wisely. When you insert debug messages into your script, you should emphasize events that might enable you to reconstruct the flow through the code leading up to an error. Capture function calls and values of parameters. Log important values only; if you write too many messages, you can slow down the application considerably.
Try to make it easy to disable and enable debug tracing. For small projects, you can comment out the debug trace statements that you want to disable. For larger projects, however, you should encapsulate the debug trace code in a script or component function that can be enabled and disabled independently of the code.