Microsoft Knowledge Base Email Alertz

(255886) - This article describes how to debug Active Server Pages (ASP) code written in Microsoft JScript or Microsoft Visual Basic Scripting Edition.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 255886 - Last Review: July 14, 2004 - Revision: 3.2

INFO: How to Pause ASP Code for Debugging

This article was previously published under Q255886

SUMMARY

This article describes how to debug Active Server Pages (ASP) code written in Microsoft JScript or Microsoft Visual Basic Scripting Edition.

MORE INFORMATION

Before debugging server-side code, you need to enable debugging for your site. From the Microsoft Management Console (MMC), right-click the virtual directory, select Properties, and click Configuration. On the App Debugging tab, select Enable ASP server-side debugging.

To debug in JScript, place the DEBUGGER statement before the line of code at which you want to pause; for example:
<%@ Language=JScript%>
<%
	Response.Write("Hello");
	debugger
	Response.Write("World");
%>
				
To debug a script written in VBScript, place the STOP statement before the line of code at which you want to pause; for example:
<%
	Response.Write "Hello"
	Stop
	Response.write "World"
%>
				
When this script is run from a browser, the debugger interrupts the script and displays the .asp file with the statement pointer indicating the location of the DEBUGGER or STOP statement. At this point, you can inspect the values assigned to variables before they are passed to the component.

NOTE: Remember to disable debugging in production servers.

APPLIES TO
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
Keywords: 
kbbug kbcodesnippet kbdebug kbinfo KB255886
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate