debugger Statement (Windows Scripting - JScript)
This page is specific to:.NET Framework Version:1.12.03.0
JScript
debugger Statement (Windows Scripting - JScript)

Updated: March 2009

Suspends execution.

debugger
Remarks

You can place debugger statements anywhere in procedures to suspend execution. Using the debugger statement is similar to setting a breakpoint in the code.

The debugger statement suspends execution, but it does not close any files or clear any variables.

NoteNote:

The debugger statement has no effect unless the script is being debugged.

Example

This example uses the debugger statement to suspend execution for each iteration through the for loop.

NoteNote:

To run this example, you must have a script debugger installed and the script must run in debug mode.

Internet Explorer 8 includes the Microsoft JScript debugger. If you are using an earlier version of Internet Explorer, see How to: Enable and Start Script Debugging from Internet Explorer.

for(i = 1; i<5; i++) {
   // Print i to the Output window.
   Debug.write("loop index is " + i);
   // Wait for user to resume.
   debugger
}
Requirements

Version 3

See Also

Concepts

Reference

Change History

Date

History

Reason

March 2009

Modified note about script debugger.

Content bug fix.

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View