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.

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.

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.

Debugging client-side scripts

Use session debug to display debugging messages in the user interface. For more information, see Session debug. 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.