Skip to content

Instantly share code, notes, and snippets.

@cdimascio
Last active July 27, 2018 15:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cdimascio/51097a179c1a99e5b928740645506feb to your computer and use it in GitHub Desktop.
Save cdimascio/51097a179c1a99e5b928740645506feb to your computer and use it in GitHub Desktop.
Connect VSCode debugger to Node.js, Typescript using webpack, mocha, ...
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"protocol": "inspector",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--recursive",
"--compilers",
"js:babel-register",
"--colors",
"${workspaceRoot}/test/tests"
],
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"port": 9229,
"restart": true,
"outFiles": ["${workspaceRoot}/build/*.js"],
"sourceMaps": true,
"smartStep": true,
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceRoot}/*"
},
"protocol": "inspector"
},
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach to Port",
"port": 5858,
"restart": true,
"sourceMaps": true,
"sourceMapPathOverrides": {
"webpack:///*": "/*"
}
}
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Process",
"type": "node2",
"request": "attach",
"port": 9229,
"restart": true,
"outFiles": ["${workspaceRoot}/build/*.js"],
"sourceMaps": true,
"smartStep": true,
"sourceMapPathOverrides": {
"webpack:///./*": "${workspaceRoot}/*"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment