APGen Documentation Previous Topic: APGScript.LastModified Next Topic: APGScript.Waiting Parent Topic: APGScript Object    APGScript Object
APGScript.Debug
See Also:

The Debug property sets/returns whether or not script errors cause error dialogs and just-in-time debugging.

Syntax

VBScript:

oAPGScript.Debug [= boolVal]

JScript:

oAPGScript.Debug [= boolVal];

Object

oAPGScript An APGScript object.

Parameters

boolVal True: Syntax errors cause error dialogs, and run-time errors allow just-in-time debugging.
False: Script errors don't trigger user interaction.

Notes

The APGScript.Debug property cannot be changed after the script has been run.  It can only be changed before the script is run for the first time.

The APGScript.Debug property allows debugging and dialog box error reporting to easily be turned off once APG scripts are in production.  When developing APG scripts, it is desirable to be notified immediately when any fatal script error occurs, and to be given the option to debug the script at the point of run-time error.  This behavior corresponds to APGScript.Debug = True.  Once APG scripts are in production, and their execution is unmonitored, it is desirable to disable debugging and any dialog box error notification.  This corresponds to APGScript.Debug = False.  Regardless of the APGScript.Debug value, all errors are logged by default.  And, you can always use custom error handlers to take action when errors occur.

If a script debugger is not installed and APGScript.Debug = True, then error dialog boxes are displayed when fatal errors occur.  If a script debugger is installed and APGScript.Debug = True, the error dialog boxes offer a debug option when fatal run-time errors occur.

The default value for APGScript.Debug is copied from the APGen.Debug property of the APGen object that opened the script.  APGen.Debug gets its default value from the registry.  By changing the registry, you can change the default value of all Debug properties on a computer.  By setting the APGen.Debug property, you can change the default Debug value for all child APG scripts.  For instructions, see the APGen.Debug topic.

Applies To

APGScript Object