DEV Community


Posted on


ServiceNow: Script Tracer

With the new Quebec release, ServiceNow has now a 'Script Tracer'!
The Script Tracer is a javascript debugger which helps you debug synchronous, server-side scripts which are executed as part of an application's logic.

To start tracing you need to open the Script Tracer via System Diagnostics > Script Tracer. The Tracer opens in a new window and then press the 'Start Trace' button to start tracing.

alt text

The tracer tracks all server-side scripts and UI actions that are triggered during the time of tracing. Errors are indicated by a red cycle with a X.

alt text

There are three tabs with more information. The state tab shows the fields and new values resulting by the script. Changed values are highlighted in green.

The Script tab shows the specific line of script, with the button 'Show Script' you can see the complete script. With the button 'View File' in the top right, you can switch directly to the file.

The Transaction tab shows details about the current transaction.

Top comments (0)