VB icon

Variable Dump

Email
Submitted on: 1/5/2015 9:42:00 PM
By: Andy Slowey (from psc cd)  
Level: Intermediate
User Rating: By 4 Users
Compatibility: ASP (Active Server Pages)
Views: 3684
 
     Helps debugging by showing you what variables you may have set.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: Variable Dump
' Description:Helps debugging by showing you what variables you may have set.
' By: Andy Slowey (from psc cd)
'
' Inputs:No specific inputs!
'
' Returns:all variable collections, names and contents
'
' Assumes:I have typically used this with a debug variable and then used SERVER.EXECUTE("scriptname") to spit out all variables in a page. It saved me a bit of time debugging.
'
' Side Effects:None that I have found!
'**************************************

<html>
<body>
<%
response.write("<H1>Core Dump</H1>")
response.write("<H2>Application</H2>")
For Each item in Application.Contents
If IsArray(item) Then
for each i in item
 Response.write(item & " : " & Application.Contents(item) & "<BR>")
Next
Else
Response.write(item & " : " & Application.Contents(item) & "<BR>")
End If
next
response.write("<H2>Session</H2>")
For Each item in Session.Contents
If IsArray(item) Then
for each i in item
 Response.write(item & " : " & Session.Contents(item) & "<BR>")
Next
Else
Response.write(item & " : " & Session.Contents(item) & "<BR>")
End If
next
response.write("<H2>Form</H2>")
For Each item in request.form
If IsArray(item) Then
for each i in item
 Response.write(item & " : " & Request.Form(item) & "<BR>")
Next
Else
Response.write(item & " : " & Request.Form(item) & "<BR>")
End If
next
response.write("<H2>QueryString</H2>")
For Each item in request.querystring
If IsArray(item) Then
for each i in item
 Response.write(item & " : " & Request.querystring(item) & "<BR>")
Next
Else
Response.write(item & " : " & Request.querystring(item) & "<BR>")
End If
next
%>
</body>
</html>


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.