With the current Versión 1.36.1 you can add args to your launch.json
Example:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/index.js",
"args":["my-url=http://192.168.1.24:8984/api/", "port=3000"]
}
]
}
In your node app you can capture Args:
process.argv.forEach(function (val, index, array)
{
console.log(val);
}
Now you can run your Visual Studio Code debug and see how args are showed
If you run the App from console it should be like this:
node index.js my-url=http://192.168.1.24:8984/api/ port=3000
The output in both cases is:
my-url=http://192.168.1.24:8984/api/
port=3000