My nodejs project uses mocha/pact.js as the test framework. I want to debug the source and not just the mocha tests. With my current launch configuration, only the breakpoints in the mocha test are reachable, they never hit the source code.
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/tests/component/my-test.js"
]
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/src/server/app.js",
"args": [
"--inspect-brk"
],
"port": 9229,
"runtimeExecutable": "npm",
}
]
}