I have:
- latest Visual Studio Code
- Express js
- Node js
This is my Attach configuration:
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
"configurations": [
{
"name": "Attach",
"request": "attach",
"type": "node",
// // TCP/IP address. Default is "localhost".
// //"address": "localhost",
// // // Port to attach to.
"port": 5858
}
]
}
This is the gulp task starting the application:
gulp.task('server', function (cb) {
exec('mongod', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
exec('node server.js', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
})
And this is the result of running Attach
request 'attach': cannot connect to runtime process (timeout after 10000ms)
What I'm doing wrong and why? How can I attach Visual Studio Code debugger to running Node app and debug server.js?