---
sourceDocument: Brazil API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/api-reference

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Script Tracer

# Script Tracer and debugging scripts {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Script Tracer and debugging scripts

The Script Tracer in ServiceNow is a powerful tool designed to help administrators and developers efficiently debug scripts and business rules by filtering and narrowing down the search for script-related issues.
It identifies specific lines of code and changes to records during execution, saving time and improving productivity in troubleshooting.
Show full answer Show less  
Accessible with the admin role via **All \> System Diagnostics \> Script Tracer**, the tool activates when you enable it and execute a UI transaction. It then traces all scripts executed during that transaction, allowing you to focus on relevant code segments.

## Key Features

* **Filters**: Narrow tracing by file type or specific table, helping target the search.
* **State Tab**: Displays differences between old and new script states, highlighting changed fields by default with an option to view all fields.
* **Error Display**: Lists errors with line numbers and messages at the top of the State tab for quick identification.
* **Script View**: Shows the exact line of code changed during execution, with an option to view the full script line.
* **Transaction History**: Displays all transaction records related to the trace.
* **Debug Script**: Opens the script in the ServiceNow Debugger for interactive debugging.
* **View File**: Opens the script directly in the platform for editing.
* **Clear Trace**: Clears the current trace results to prepare for a new trace session.

## Practical Usage and Limits

By default, Script Tracer captures up to 1,000 lines of script during tracing. To avoid excessive data, this limit can be adjusted by setting the **glide.debug.trace.tracelinelimit** property. It is important to review and clear the current trace before starting a new one, as each trace session is independent.

Note that if a file is not reflected in the trace, it indicates that changes to the record were not recognized by the system during execution.

## Benefits for ServiceNow Customers

Script Tracer enables customers to pinpoint script issues faster by focusing only on relevant lines and changes, rather than searching broadly. This targeted debugging approach reduces troubleshooting time, increases accuracy in identifying problems, and supports maintaining optimal script performance and business rule behavior in the ServiceNow platform.  
The Script Tracer can help you filter your debugging search to quickly narrow down script problems. You can identify lines of code in a script and other changes to its record during execution. Finding those specific lines of
scripts rather than doing a wide search helps save time and improves productivity.

## Overview of Script Tracer {#script-tracer__section_qfn_mxg_knb}

Use the Script Tracer to narrow your search so you can debug scripts and business rules more efficiently. With the admin role, you can access Script Tracer by navigating to AllSystem DiagnosticsScript Tracer.

After you enable Script Tracer and execute a UI transaction, the Tracer searches through all the scripts being executed. The following filters are available:  
* File type: Search for a specific file type
* Table: Look in the specific table for the script being executed
{#script-tracer__ul_vhk_qsp_pnb}

The Script Tracer searches for changes in the record during script execution and presents them in a list for you to examine. When you select Start Tracer, the Tracer begins searching for changes in the
record. You can select the Debug Script button at any time to see the script itself.

Use the tabs to see specific information from the Tracer.  
The State tab displays the differences between the old and new scripts.

* By default, the Show only changed values check box is enabled, so you can avoid fields that have not changed.
* To view all the fields (changed or not), you can clear that check box.
{#script-tracer__ul_exv_ctp_pnb}  
Note:  
If the file is not reflected in the trace statement, it means the changes to the record aren't recognized by the system.

If there are any errors, they display at the top of the State tab, with their line numbers and error message
displayed in order of occurrence.

* Script: Displays the line of changed code that the record has undergone during execution. You can view the entire line of script by selecting the Show Script button.
* Transaction: Shows all transaction records of the trace
* Debug Script: Opens the script in Debugger to debug the script
* View File: Opens the script in the ServiceNow platform for editing
* Clear trace: Clears the trace when you're finished.
{#script-tracer__ul_a31_btp_pnb}

## Limiting the tracer {#script-tracer__section_eh5_dgv_pnb}

You may want to set a limit for your trace so that you don't generate too many returns. By default there will be up to 1,000 lines of script traced. After this number is reached you must clear the trace and start tracing again.
If you want to change the maximum number of lines for tracing you can configure your limit using the property glide.debug.trace.trace_line_limit.

Since each trace you run is new, make sure you're finished reading the results of one trace
before clearing it and beginning another one.

To learn more, see [Debugging scripts](https://www.servicenow.com/docs/IQNie2C6kpbAf75MhvmvSg "Debug scripts using session logs and ServiceNow AI Platform debugging tools such as a walk-through script debugger and error messages that display in the UI.").

*[\>]: and then


