Is there a video or guide on how to set up visual studio code debugging with Switch scripts?
Thanks
node.js debugger setup
Re: node.js debugger setup
Thanks for the video!
There is one thing extra that should be mentioned: this very easy method (it is all pre-configured) is available when you work with script folders. You can use the SwitchScriptTool for that, or you can right click on a "Script element" and create the script folder from there. Extra remark: the use of TypeScript is heavily recommended.
There is one thing extra that should be mentioned: this very easy method (it is all pre-configured) is available when you work with script folders. You can use the SwitchScriptTool for that, or you can right click on a "Script element" and create the script folder from there. Extra remark: the use of TypeScript is heavily recommended.
-
- Newbie
- Posts: 3
- Joined: Fri Sep 23, 2022 5:23 pm
Re: node.js debugger setup
Thank you both!
Re: node.js debugger setup
I think something got messed up with my attach configuration, none of the variables appear and the debugger doesn't hit any of my break points. I re-watched all the learning path videos, but nothing goes into detail on how this should be configured. This used to work, but I think I developed the script package in a previous version of Switch and now it's not working.
I'm running Switch 2023 Fall.
This is what my launch.json looks like:
I'm running Switch 2023 Fall.
This is what my launch.json looks like:
Code: Select all
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
}
]
}
Re: node.js debugger setup
Also I see my switch-scripting module is a bit out of date:
Does that matter?
Code: Select all
"node_modules/@types/switch-scripting": {
"version": "22.1.0",
"resolved": "https://github.com/enfocus-switch/types-switch-scripting/archive/22.1.0.tar.gz",
"integrity": "sha512-tZ3xqi1OByOGYmqX6ymjYa6Vw2Q/KhbPeiE4bJflo+/L5kT0jF1hS3dSNt6Fa1/2TplqNPhjLbnv/UE0LVSbyw==",
"dev": true,
"license": "UNLICENSED"
},
Re: node.js debugger setup
A common mistake is not being in the correct folder in VSC when attaching. You should have the script folder open at the level of the main.ts. One level too high, one level too low and you do not see the right things.