--- title: Debugging scripts description: 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. locale: en-US canonical_url: https://www.servicenow.com/docs/r/api-reference/scripts/script-debug-overview.html release: brazil product: Scripts classification: scripts topic_type: concept last_updated: "2026-09-10" reading_time_minutes: 2 breadcrumb: [Scripting, API implementation, API implementation and reference] --- # Debugging scripts 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 Use the Script Debugger and session logs to debug server-side code. For more information, see [Script Debugger and Session Log](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/script-debugger.md). 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 [Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_SessionDebug.md). 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/GSLogBoth.md). ## Debugging client-side scripts Use session debug to display debugging messages in the user interface. For more information, see [Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_SessionDebug.md). 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 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_DebuggingApplications.md). - **[Script Debugger and Session Log](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/script-debugger.md)** 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. - **[Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_SessionDebug.md)** Enable session debugging to display debugging messages in the user interface. - **[Debugging applications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_DebuggingApplications.md)** 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/r_DebuggingBusinessRules.md)** Debugging business rules can be achieved with resources available in the ServiceNow product. - **[Debugging classifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/r_DebuggingClassifications.md)** You must add a system property to enable classification debugging. - **[JS Code Coverage Debug utility](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/js-code-coverage-debug.md)** JS Code Coverage Debug 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. - **[JavaScript debug window](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_JavaScriptDebugWindow.md)** The JavaScript debug window appears in a bottom pane of the user interface when an administrator turns on debugging. - **[Packages Call Removal Tool](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/c_PackagesCallRemovalTool.md)** The Packages Call Removal Tool provides modules to identify fields that might contain scripts, find scripts that contain Packages calls to ServiceNow Java classes, and to examine proposed script changes that eliminate those Packages calls. **Parent Topic:**[Scripting on the ServiceNow AI Platform](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/scripts/scripting-landing.md)