I've been running into some strangeness when trying to debug a new script.
I am on Switch 25.11, running Visual Studio Code Version: 1.108.1.
When I attach the debugger to my script, I get taken to the NodeScriptExecutor.js script as you would expect.
Upon pressing the Continue button expecting to be taken to my actual main.js file, I instead see another file called outMain.js, which has the following contents:
Code: Select all
Could not load source 'd:\Automation Resources\Scripts\Switch Scripts\ProductionTrackerImporter\outMain.js': Error processing source: RangeError: Invalid count value: -2
at String.repeat (<anonymous>)
at Ua.content (c:\Users\workflow\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.js-debug\src\extension.js:67:3)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async r._onSource (c:\Users\workflow\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.js-debug\src\extension.js:131:3006)
at async pu._onMessage (c:\Users\workflow\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\ms-vscode.js-debug\src\extension.js:48:5028).
If I press continue again, my script does run, but none of my breakpoints are honored, meaning I am unable to debug what is actually failing in my script.
Has anyone come across a problem like this before?
Any help is greatly appreciated!
Many thanks,
Dan