{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":677,"path":"api-reference/scripts/script-debug-overview.md","title":"Debugging scripts","bundle":null,"doc_type":null,"release":"australia","body":"\n# Debugging scripts\n\nDebug 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.\n\n## Debugging server-side scripts\n\nUse 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/australia/markdown/australia/api-reference/scripts/script-debugger.md).\n\nYou 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/australia/markdown/australia/api-reference/scripts/c_SessionDebug.md).\n\nGSLog 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/australia/markdown/australia/api-reference/server-api-reference/GSLogBoth.md).\n\n## Debugging client-side scripts\n\nUse session debug to display debugging messages in the user interface. For more information, see [Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_SessionDebug.md). Use the session log to view logging information for script includes and custom UIs, such as Agent Workspace.\n\nYou can also debug client-side scripts using browser-based developers tools.\n\n## Debugging applications and scopes\n\nUse 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/australia/markdown/australia/api-reference/scripts/c_DebuggingApplications.md).\n\n-   **[Script Debugger and Session Log](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/script-debugger.md)**  \nThe 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.\n-   **[Debugging sessions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_SessionDebug.md)**  \nEnable session debugging to display debugging messages in the user interface.\n-   **[Debugging applications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_DebuggingApplications.md)**  \nApplication 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.\n-   **[Debugging business rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/r_DebuggingBusinessRules.md)**  \nDebugging business rules can be achieved with resources available in the ServiceNow product.\n-   **[Debugging classifications](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/r_DebuggingClassifications.md)**  \nYou must add a system property to enable classification debugging.\n-   **[JS Code Coverage Debug](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/js-code-coverage-debug.md)**  \nJS 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.\n-   **[JavaScript debug window](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_JavaScriptDebugWindow.md)**  \nThe JavaScript debug window appears in a bottom pane of the user interface when an administrator turns on debugging.\n\n**Parent Topic:**[Scripting](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_Script.md)\n\n"}}