Watches Debugger Subtab

Note:

The Watches subtab isn't used for SuiteScript 2.1 scripts. Variable watches in SuiteScript 2.1 scripts are done on the Chrome DevTools debugger console. For more information about debugging SuiteScript 2.1 scripts, see Chrome DevTools for SuiteScript 2.1 Script Debugging.

The Watches subtab lets you add or remove variables and expressions to a list that's kept up-to-date ("watched") while your script executes.

The Script Debugger Watches tab.

The variables and expressions are always evaluated in the current call stack. This means that by default, they're evaluated at the current line of script execution. However, if you switch to a different function in the call stack, they're re-evaluated at that location.

You can also use the Watches subtab to view object properties with a command-line interface. Any property that is viewable from the property browser can be added as a watch expression by referencing the property using dot ( . ) notation, even if the property is private in the script. For example, to watch the ID of a record object (referenced by a variable called record), type record.id in the Add Watch field.

Related Topics:

General Notices