Skip to content

Commit

Permalink
Simplify vscode debugging (developers)
Browse files Browse the repository at this point in the history
Make debugging from vscode easier, using a specific Node-RED
settings file, which is stored in the .vscode directory.
  • Loading branch information
dirkjanfaber committed Dec 9, 2024
1 parent 301d24c commit 3d7a156
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"name": "Launch Node-red",
"program": "${env:NVM_BIN}/../lib/node_modules/node-red/red.js",
"cwd": "${env:HOME}",
"args": ["-s", "${workspaceFolder}/.vscode/settings.js"],
"runtimeArgs": ["--preserve-symlinks", "--experimental-modules"],
"env": {
"NO_UPDATE_NOTIFIER": "1",
"DEBUG": "*",
// "DEBUG": "*",
"NODE_RED_DBUS_ADDRESS": "venus.local:78"
}
},
"console": "integratedTerminal"
},
{
"type": "node",
Expand Down
16 changes: 16 additions & 0 deletions .vscode/settings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
uiPort: 1880,
flowFile: 'flows.json',
userDir: process.env.HOME + '/.node-red',
functionGlobalContext: {},
debugMaxLength: 1000,
nodesDir: [process.env.HOME + '/git/node-red-contrib-victron/src/nodes'],
verbose: true,
logging: {
console: {
level: "debug",
metrics: false,
audit: false
}
}
};
2 changes: 1 addition & 1 deletion node-red-contrib-victron.code-workspace
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"folders": [
{
"path": "../../.node-red/node_modules/@victronenergy/node-red-contrib-victron"
"path": "."
}
],
"settings": {}
Expand Down

0 comments on commit 3d7a156

Please sign in to comment.