Is it possible to add breakpoints to ones Mocha tests using Visual Studio Code?
Normally when debugging code one need to configure the launch.json, setting the prog
If you add ${file} variable at the end of the args list you can start debugging directly from the file you have open:
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${file}"
],
"internalConsoleOptions": "openOnSessionStart"
}