ok, then this is how i do NR development on full source...
Using a debug config
where starting debug is as simple as pressing F5
launch.json
{
"version": "0.2.0",
"configurations": [
// add entry to launch.json to debug node-red
{
"type": "node",
"request": "launch",
"name": "debug node-red",
"skipFiles": [
"<node_internals>/**"
],
"env": {
"NODE_ENV": "development",
"port": "1881",
},
"preLaunchTask": "npm: build-dev",
"program": "${workspaceFolder}\\packages\\node_modules\\node-red\\red.js"
}
]
}
You may also need to add a tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build-dev",
"group": "build",
"problemMatcher": [],
"label": "npm: build-dev",
"detail": "build-dev"
}
]
}
Using the newer "Auto Attach" feature of VSCode
- Open a terminal window inside vscode
- set VSCode to use "Auto Attach: Always"
- run
npm run dev