Debugger stops after gr.newRecord() in Script Include (Xanadu/Yokohama)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 03:54 AM
Hi everyone,
I’ve encountered an issue while debugging Script Includes in recent ServiceNow releases (tested on Xanadu and Yokohama). Specifically, when I place a breakpoint on or after a gr.newRecord() call, the debugger is unable to step over or proceed to the next line. The execution appears to continue correctly behind the scenes, but from the debugger’s perspective, it’s stuck or silently skips the following lines.
I’ve tested this behavior across multiple instances and it seems consistent, which makes me wonder:
Has anyone else experienced this behavior when using newRecord() in a Script Include?
Do you know if this is a known limitation, intentional behavior, or a bug?
Is there an open HI ticket or internal bug report that tracks this?
Any insights or workarounds would be greatly appreciated. Thanks in advance!
Code tested:
// Script include
var demo = Class.create();
demo.prototype = {
initialize: function() {
},
createRecord: function () {
var incident = new GlideRecord("incident");
incident.newRecord();
incident.short_description = 'Test';
},
type: 'demo'
};
// Background script
var sc = new global.demo();
sc.createRecord();
- Labels:
-
bug
-
newRecord
-
Script Debugger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 04:10 AM
are you saying it's not setting the incident short_description field?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 06:15 AM
No. I said:
Specifically, when I place a breakpoint on or after a gr.newRecord() call, the debugger is unable to step over or proceed to the next line. The execution appears to continue correctly behind the scenes, but from the debugger’s perspective, it’s stuck or silently skips the following lines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2025 06:26 AM
seems a known thing.
check this link
Script Debugger exits when stepping over GlideRecord.insert
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader