VS Code Sync
Install and use sn-scriptsync to sync ServiceNow scripts with VS Code for a better development experience.
sn-scriptsync enables real-time synchronization between ServiceNow scripts and VS Code.
Installing in VS Code
Search for "sn utils" or "scriptsync" in the Extensions panel and install it.

Configuration
Check the auto-start setting:

Create a folder matching the setting name (default: scriptsync). When you open this folder in VS Code, the WebSocket server automatically starts.
After opening the folder, you'll see the status in the VS Code status bar.

Click to start or stop the server manually.
Basic Usage
In SN Utils settings, ensure Enable sn-scriptsync buttons (VS Code) is checked.
Open a script record (try /si creatorconutils):

Workflow
- Click the save icon next to the script field
- Helper tab opens - Acts as a proxy between the instance and VS Code via WebSocket
- Script syncs to VS Code - Stored in:
instance/scopename/tablename/fieldname.extension - Edit in VS Code - Make changes and save
- Changes sync back - Updates appear instantly in ServiceNow
First-Time Instance Approval
The first time you sync from an instance, you need to approve connectivity in the helper tab:

- Helper tab icon turns red when attention needed
- Approve connectivity (one-time per instance)
- Activity log shows all sync operations
After approval, the instance is saved and future syncs work automatically.
Load All Scope Scripts
Instead of syncing files one by one, pull in all scripts for a scope:

- Click the sn-scriptsync icon in the VS Code activity bar
- Click Load Scope at the bottom
- Watch requests in the helper tab
- Files appear organized by table type (similar to Studio layout)
Context Menu and Command Palette
Most options are available via context menu or command palette:

Context Menu Visibility
The sn-scriptsync context menu commands only appear when the server is running. You can also hide them completely using the showContextMenu setting, with optional per-language overrides:
{
"sn-scriptsync.showContextMenu": true,
"[markdown]": {
"sn-scriptsync.showContextMenu": false
}
}
Additional Resources
- sn-scriptsync on GitHub — Source, changelog, and issue tracker
- YouTube tutorials — Video walkthroughs and demos