-
-
Save boostup/325120888565896dbb12a888ad9a0ac1 to your computer and use it in GitHub Desktop.
VSCode: generic debug config for nodejs app + mocha test runner. Useful resources: [http://www.albertgao.xyz/2016/12/16/how-to-debug-mocha-tests-in-visual-studio-code-with-es5-or-es6/] [https://go.microsoft.com/fwlink/?linkid=830387]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch App", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceFolder}/src/index.js", | |
// Automatically stop program after launch. | |
"stopOnEntry": false, | |
// Command line arguments passed to the program. | |
"args": [], | |
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace. | |
"cwd": "${workspaceRoot}", | |
"runtimeArgs": [ | |
"--nolazy" | |
], | |
"sourceMaps": true, | |
"env": { "NODE_ENV": "production"} | |
}, | |
{ | |
// Name of configuration; appears in the launch configuration drop down menu. | |
"name": "Run mocha", | |
// Type of configuration. Possible values: "node", "mono". | |
"type": "node", | |
"request": "launch", | |
// Workspace relative or absolute path to the program. | |
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", | |
// Automatically stop program after launch. | |
"stopOnEntry": false, | |
// Command line arguments passed to the program. | |
"args": ["src/**/*.spec.js"], | |
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace. | |
"cwd": "${workspaceRoot}", | |
"runtimeArgs": [ | |
"--nolazy" | |
], | |
"sourceMaps": true, | |
"env": { "NODE_ENV": "production"} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment