I know, I know.
VS Code version: 1.25.1 Mocha: 4.0.1
Running mocha via launch.json:
{
"name": "mocha",
"protocol": "inspector",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": ["--no-timeouts", "--colors"], //you can specify paths to specific tests here
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"NODE_ENV": "testing"
},
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/dist"
],
}
and set breakpoint in a file will open another tabbed window of same file with new title "read-only inlined content from source map" and breakpoint may be misaligned. In addition, you try to edit file and you realize you can't.
After flailing at different solutions, dang if setting the sourceMap to false worked for me:
"sourceMaps": false,
Note: the "outFiles" did nothing, it is an artifact of trying different solutions, including build a map to /dist.
I'm not sure what changed in my configuration/setup. I just upgraded to vscode 1.25, but I don't really know.
This answer is the opposite of Breakpoints and debugging statements open "read-only inlined content"
Good luck!
Reposting answer from above:
In launch.json:set sourceMaps to false:
"sourceMaps": false,
This answer is the opposite of Breakpoints and debugging statements open "read-only inlined content"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With