APGen Documentation Previous Topic: APGScript.Util Next Topic: APGScript.Globals Parent Topic: APGScript Object    APGScript Object
APGScript.StartInDebugger
See Also:

The StartInDebugger property sets/returns whether to break in the debugger when the script is started.

Syntax

VBScript:

oAPGScript.StartInDebugger [= boolDebugger]

JScript:

oAPGScript.StartInDebugger [= boolDebugger];

Object

oAPGScript An APGScript object.

Parameters

boolDebugger Whether to break in the debugger when the script is started.  The default value is False. 

Notes

If StartInDebugger is True when an APG script is run, APGen starts the script debugger and halts execution at the first executable line in the script.

When StartInDebugger is True, you will usually break into the script while running global code.  To debug a procedure, set a breakpoint in the procedure.  Or, you can step through the global code and step into any existing Main procedure after the last line of global code executes.

The StartInDebugger property cannot be set to True unless APGScript.Debug is True.  In addition, the StartInDebugger property cannot be set to True if no script debugger is installed.

When a script is run from the command line with the /b switch, APGen.exe sets StartInDebugger to True.

Example

This example sets the StartInDebugger property to True before running a script.

<%#

Dim oAPGen, oScript
Set oAPGen = Script.CreateObject("APGen")
Set oScript = oAPGen.OpenScript("hello.apg")

' Break in the debugger when the first line is executed
oScript.StartInDebugger = True

oScript.Run

#%>

Applies To

APGScript Object