Closed ghost closed 7 months ago
That is probably an issue after the 3.0 update. Had a question about it on SN Devs Slack as well. I was thinking of removing that feature, as we have the BG Script monitor editor now...
The output does not appear in VS COde but the script should be triggered in the browser btw
Sorry for this support question in the issues. Where can I find more information about the BG Script monitor editor?
I meant the VS Code style BG script you can enable in the settings (I phrased it bad)
Yeah this helps with making the BG editor in the website nicer. However wanted to see if GitHub Copilot could help me write some ServiceNow scripts and that is only available directly from within VS Code. So think it still is valuable to have the ability to run and see background scripts from within VS Code :)
Thats a good use case. I'll have a look. will let you know, Goed weekend!
Fantastic :) Jij ook een fijn weekend!
I leave it open till it is fixed
Looking into this, it seems to work for me. How about you?
At the moment ⌘↩ only inserts a newline in the current file for me and doesn't execute the script in the browser window. Have to press the right mouse button and navigate towards the menu item "sn-syncscript: Execute backgroundscript (.js files in /background folder only)", which does run the script and presents the output in the browser window.
Another thing I noticed, but maybe its unrelated is that the folder is being created is "no_scope". While the I am sure that the script is being executed in a scope because it allows the ES12 syntax. Maybe this also has to do with our instance that might be a bit different than other ServiceNow instances (we are on the Utah release).
Hello Arnoud,
Thank you for the wonderful SN extensions :)
Was trying to run a background script in a scope and there doesn't seem to be any output although I do see the output appear in the website. Also the keypress CMD + Enter doesn't seem to be picked up to run the script. Where should the output appear in VS Code?
Best regards, Sander