I am trying to debug my nodejs application written in ES6 from VSCode. But it is throwing following error:
node --debug-brk=18712 --nolazy index.js
Debugger li
You need to set runtimeExecutable
in launch.json configuration file to the value of babel-node's path.
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via Babel",
"program": "${workspaceRoot}/index.js",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
"cwd": "${workspaceRoot}"
}
]
}