Script debugger not working for Scheduled Scripts?

Toon2
Kilo Contributor

Hi,

Am I right that it is not possible to use the script debugger for a Scheduled Script?

I've made a script that is working fine but I notice that I can not debug it and step through it in the script debugger as it doesn't stop on the breakpoints I add.

Am I doing something wrong? If not, what's the reason why this script cannot be debugged with the debugger?

Thanks.
Toon

1 REPLY 1

Jace Benson
Mega Sage

The script debugger only runs on interactive contexts.

Scheduled Jobs, and Script Actions run in a separate context from your own session.  If you want to debug them using the debugger, make a script include, and debug that within a fix script calling a script include as that will run it interactively.  Then have the scheduled job call the script include.

Source: https://docs.servicenow.com/bundle/kingston-application-development/page/script/debugging/concept/sc...