---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Debugging scripts

# Debugging scripts {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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.

## Debugging server-side scripts {#script-debug-overview__section_a1g_3fw_33b}

Use the Script Debugger and session logs to debug server-side code. For more information, see
[Script Debugger and Session Log](https://www.servicenow.com/docs/access?context=script-debugger&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US).

You can also use session debug to display error messages related to a server-side script that
runs as a result of a client-side change. For more information, see [Session debug](https://www.servicenow.com/docs/access?context=c_SessionDebug&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US).

GSLog is a script include that simplifies script logging and debugging by implementing levels of log output, selectable by per-caller identified sys_properties values. For more information, see [GSLog API](https://www.servicenow.com/docs/access?context=GSLogBoth&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US).

## Debugging client-side scripts {#script-debug-overview__section_r2q_wgw_33b}

Use session debug to display debugging messages in the user interface. For more information,
see [Session debug](https://www.servicenow.com/docs/access?context=c_SessionDebug&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US). Use the session log to view logging information for
script includes and custom UIs, such as Agent Workspace.

You can also debug client-side scripts using browser-based developers tools.

## Debugging applications and scopes {#script-debug-overview__section_gvc_xgw_33b}

Use the application debugging options to understand how a script's application scope might
affect your application, table, or record. You may need to update cross-scope privileges to
troubleshoot scope access issues. See [Debugging applications](https://www.servicenow.com/docs/access?context=c_DebuggingApplications&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US).
* **[Script Debugger and Session Log](https://servicenow-prod.fluidtopics.net/qXctZpS2O8PFvE2yPbcemg)**   
  The Script Debugger enables users with the script_debugger role to debug server-side JavaScript. Users with the log_debugger role can use the Session Log to view and download required logs.
* **[Session debug](https://servicenow-prod.fluidtopics.net/6U8FBIdhIQUq1_uHveNNHA#c_SessionDebug)**   
  Enable session debugging to display debugging messages in the user interface.
* **[Debugging applications](https://servicenow-prod.fluidtopics.net/4s~zrtUEsnjZJZi4D98jWg#c_DebuggingApplications)**   
  Application developers can display debug messages about configuration records to help them troubleshoot issues. The Debug Scopes module provides information about the system switching between custom applications to run server-side scripts.
* **[Debugging business rules](https://servicenow-prod.fluidtopics.net/2lGn7vYvnhzPLpsZRvlzbA)**   
  Debugging business rules can be achieved with resources available in the ServiceNow product.
* **[Debugging classifications](https://servicenow-prod.fluidtopics.net/6JVYeMQWybyftm29z8ydNA)**   
  You must add a system property to enable classification debugging.
* **[Field watcher](https://servicenow-prod.fluidtopics.net/NsxpiUGrpkpZW4wR~bvptw#c_FieldWatcher)**   
  The field watcher tool tracks and displays all actions that the system performs on a selected form field.
* **[Writing to the debug log](https://servicenow-prod.fluidtopics.net/lf9ORq_DsjZfmSq8S5IEEw#c_WritingToTheDebugLog)**   
  To write to the debug log in your client-side JavaScript, or UI policies, make a call to the global function `jslog()`.
* **[JavaScript debug window](https://servicenow-prod.fluidtopics.net/YDCg1x2W_LZXimF0dqAGkQ#c_JavaScriptDebugWindow)**   
  The JavaScript debug window appears in a bottom pane of the user interface when an administrator turns on debugging.
* **[JS Code Coverage Debug](https://servicenow-prod.fluidtopics.net/aIKv2c5Zm~fS3oZ_ZlvnjA#js-code-coverage-debug)**   
  The JS Code Coverage Debug application allows administrators and application developers to log the server-side scripts triggered during a user session and then review which lines of code the system ran.

