I was surprised when I found how it's hard to set up such simple thing as "debug" in Visual Studio Code. It's unclear at all! For debug configuration we have just one json file and what exactly should be placed there - nobody knows. Additional problem were caused by using Babel ES2015 in code.
So, that exactly have to be done:
.vscode\launch.json
and place there:
So, that exactly have to be done:
1. launch.json
Create file if it doesn't exists:.vscode\launch.json
and place there:
{
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"name": "Debug Mocha Test",
"type": "node",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": true,
"args": [
"--compilers",
"js:babel-core/register",
"--recursive"
],
"cwd": "${workspaceRoot}/.",
"runtimeExecutable": null,
"env": {}
}
]
}