Skip to content

Instantly share code, notes, and snippets.

@ra9r
Last active June 14, 2019 18:51
Show Gist options
  • Save ra9r/1f072064af2a6dc72f30c3928d886122 to your computer and use it in GitHub Desktop.
Save ra9r/1f072064af2a6dc72f30c3928d886122 to your computer and use it in GitHub Desktop.
Mocha Launcher for VSC #vsc #mocha
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Mocha",
"type": "node",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": ["--no-timeouts", "test"],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"NODE_ENV": "development"
}
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command.PickProcess}",
"port": 5858,
"sourceMaps": false,
"outDir": null
}
]
}
@ra9r
Copy link
Author

ra9r commented Aug 26, 2016

This is how I've setup Mocha to run in Visual Studio Code to also support breakpoints. It doesn't require any outside steps like running mocha --debug-brk or the like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment