How to see the output of gs.debug() function

Johannes Mweli
Giga Guru

Hi ServiceNow Community Developers,

If I am using the gs.debug() function in a scoped application where do I go to see the output that was printed out by the function?

For instance, if I use gs.log() in a global application I normally navigate to "Script Log Statements" and I would see the output there. For gs.debug() how & where do I see the output? Please advise.

Thanks,

Johannes

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Go to the sys_app table (e.g. type sys_app.list in the Application navigator search box), find your scoped app record in the list and open it.

Down in the Related links, you'll see "enable session debugging" - click it.

You'll then see your gs.debug/gs.info/gs.warn/gs.error statements at the bottom of standard lists and forms and as of New York, you'll also see them in the Script Debugger on the session log tab.

There may be an easier way, but this is how I do it (since System Applications> Applications no longer brings you to sys_app.list).

View solution in original post

6 REPLIES 6

Chuck Tomasi
Tera Patron

Go to the sys_app table (e.g. type sys_app.list in the Application navigator search box), find your scoped app record in the list and open it.

Down in the Related links, you'll see "enable session debugging" - click it.

You'll then see your gs.debug/gs.info/gs.warn/gs.error statements at the bottom of standard lists and forms and as of New York, you'll also see them in the Script Debugger on the session log tab.

There may be an easier way, but this is how I do it (since System Applications> Applications no longer brings you to sys_app.list).

Johannes Mweli
Giga Guru

Thanks Chuck, your response was very very helpful

Chuck Tomasi
Tera Patron

If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.

Thank you

Chuck Tomasi
Tera Patron

For what it's worth, output from gs.debug/info/warn/error also go to System Logs> All - great for asynchronous operations.