It's always best to have a debugger, the step into and step over fuctions, etc., server-side especially, are life savers. But, if you don't have one (for what ever reason) try saving the following code into a seperate file - with an asp or inc extension recommended - and simply <!--#Include File="the file name" //-->
<%
Dim bDebugging
Sub TraceStart()
bDebugging = True
DebugIt "Tracing started"
End Sub
Sub TraceStop()
DebugIt "Tracing stopped"
bDebugging = False
End Sub
Sub DebugIt( strString )
If bDebugging Then
Response.Write "Debugging: " & strString & "<br>"
End If
End Sub
Sub TraceProcedureStart( strProcedure )
DebugIt strProcedure & " started"
End Sub
Sub TraceProcedureEnd( strProcedure )
DebugIt strProcedure & " ended"
End Sub
Sub CheckError()
Response.Write "<br>Error Description is: " & Err.Description & ".<br>"
End Sub
%>
Then you can TraceStart(), and DebugIt"variable name = " & variable name, and TraceStop() {on seperate lines} to gain visiblity to what's going on at that point. Better yet, TraceStart() once at the start of the file, and TraceStop() at the end, then you can DebugIt" " as many times as you want - and if you don't want to comment each one out or delete them you can simply set bDebugging to False in TraceStart. Enjoy, Wendell
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.