Important alert: (current site time 7/15/2013 10:37:30 PM EDT)
 

winzip icon

Debug Info - Page footer based info display

Email
Submitted on: 1/7/2004 7:55:57 PM
By: Hunter Beanland  
Level: Beginner
User Rating: By 4 Users
Compatibility: ASP (Active Server Pages)
Views: 9117
author picture
(About the author)
 
     [updated 2004/05/05] Debug Info is a VBScript class useful for developing and debugging ASP web pages. By placing 3 lines of code in the top of every asp page (or include in your header include file) you can see a lot of what is going on in each of your pages. Debug Info can display QueryString, Form, Session, Application, Cookie, Server, and ADO variables and properties in separate expandable / collapsible sections. Most collections are editable and can be saved or re-posted. This code is based on an example from Microsoft which "Mike" (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7475&lngWId=4) rebuilt. Mike added some great formatting which I have enhanced. In particular: Added Database, Application, StaticObjects, session properties, Null and Array awareness and Mozilla support, editable collections, reposting and a complete code cleanup. Full code, demo and help included.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 7 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 Beginner 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
1/8/2004 12:19:26 PMCode Author

Pretty nice work but you don't need the to lines at the bottom of every page -- in the class just do something like:

Private Sub Class_Terminate()
DebugInfo.Display
End Sub

the class is destroyed on page load and it will call the Class_Terminate function automatically :)
(If this comment was disrespectful, please report it.)

 
1/8/2004 11:57:42 PMHunter Beanland

Yeah, I did think of it, then thought I wanted to give more control over when to display it, but then again, that can be controlled by destroying the class early (set DebugInfo = nothing).
Anyway, I guess you are right, so i have amended the code as you said. I have also made some small fixes.
(If this comment was disrespectful, please report it.)

 
1/11/2004 4:22:02 PMMark Buckley

Hunter,

This is Awesome code. I have been using this code in my apps since "mike's" version. I just downloaded your 2.1 version and see a major problem. Unless I missing something you appear to have eleimnated an easy metod of turning this code on an off. In previuos versions you had a property called ENABLED. By setting a session variable to TRUE or FALSE I was able to turn on or off this code very easyliy with a simple change to a single line code. Now that you have removed this property I'm not sure how to go about easily turning this code on and off. If I comment out the Set DebugInfo = New clsDebug line then all my DebugInfo.Print's error with a Object required error. Am I missing something here? Please help, I really like this code, it has saved me countless hours in development time. Thanks in Advance.

Mark Buckley
(If this comment was disrespectful, please report it.)

 
1/12/2004 1:25:41 AMHunter Beanland

You're right. That is a problem. I have my footer running in a on error resume next for various reasons, so I overlooked the .Print errors. Anyway, I have added .Enabled once again (v2.2) so this should give you complete control now. Thanks for the feedback.
(If this comment was disrespectful, please report it.)

 
1/12/2004 3:51:50 AMMark Buckley

Hunter,

Thanks for the quick response. Downloaded and tested the 2.2 code this morning, works great. Again thanks for all the work you have put into this it is awesome code. I use this in every app I develop. Makes testing so much easier. Great work!

Mark Buckley
(If this comment was disrespectful, please report it.)

 

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.