JScript  

Debug Directive

[This is preliminary documentation and subject to change]

Turns on or off the emission of debug symbols.

@set @debug(on | off)

Arguments

on

Optional. Keyword that turns debug on.

off

Optional. Keyword that turns debug off.

Remarks

Program code written by a JScript author sometimes differs from the actual code being compiled and run. Host environments, such as ASP+, or development tools may emit their own code into the program. This code is generally of no interest to the author. Consequently, when an author is debugging their code, they want to see only those parts of the program that they wrote and not the parts generated by their development tools. Also, package authors may want to turn off debugging for similar reasons.

By default, debug information is turned on. When the debug directive appears, it remains in effect until the next debug directive is found or the end of the file is encountered.

Example

The following code will emit debug symbols for all identifiers except _PrivateVar and _PrivateFunc:

// Turn debugging off. _PrivateVar will not have debug information.
@set @debug(off)
var _PrivateVar;
// Turn debugging information on.
// var1 and func1 will have debug information.
var var1;
function func1() { /*... /*};
// Turn debugging back off again for the remainder of the script.
@set @debug(off)
function _PrivateFunc() { /*... /*};

Requirements

Version 7

See Also

Option Directive | Position Directive