I downloaded the yeomen generator generator and opened it using Visual Studio code. The debugger works well. When I clicked on the debug sidebar button, the launch.json file was created for me. The launch.json generator is looking at package.json, which has one "scripts": { "start": "grunt"}.
The generator uses grunt to run the application. The launch.json file had the following:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "grunt",
"stopOnEntry": false,
"args": [],
"cwd": ".",
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858
}
]
}
When I replace 'program' : 'grunt'with server.js, it works. If I could change the type to grunt, but it seems that only node or mono is supported there.
source
share