- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 05:59 PM
I am new to ServiceNow development and I am having trouble testing because I can't figure out how to print to the "console" or any type of console adjacent. I am used to being able to console.log() when testing javascript code to check values, but I am not sure what I should be doing in SN.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 06:05 PM
There are multiple different debugging logs available in servicenow for client side and server side scripts. console.log() can be used on client side script only. in addition we have JSLOG(), alerts etc. On server side we have gs.info, gs.warn, gs.log etc and server logs generates in System Logs > System Log > All.
For more information regarding Servicenow debugging and debugging best practices please refer below
I hope this helps!
Thanks & Regards,
Sharjeel
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 06:05 PM
There are multiple different debugging logs available in servicenow for client side and server side scripts. console.log() can be used on client side script only. in addition we have JSLOG(), alerts etc. On server side we have gs.info, gs.warn, gs.log etc and server logs generates in System Logs > System Log > All.
For more information regarding Servicenow debugging and debugging best practices please refer below
I hope this helps!
Thanks & Regards,
Sharjeel
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 03:03 PM
For anyone new to ServiceNow (like myself) the editor will highlight client side script lines with a `!` when using console.log(). It will still run regardless of this.