Skip to content

Instantly share code, notes, and snippets.

@ariesmcrae
Last active August 24, 2019 04:57
Show Gist options
  • Save ariesmcrae/63ed99cf6893d67b7a4f33d9703277e1 to your computer and use it in GitHub Desktop.
Save ariesmcrae/63ed99cf6893d67b7a4f33d9703277e1 to your computer and use it in GitHub Desktop.
Enable vscode debugging of typescript
//For Mocha
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--require", "ts-node/register",
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test/**/*.ts"
],
"internalConsoleOptions": "openOnSessionStart"
},
]
}
//For Jest
{
// 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": [
// {
// "type": "node",
// "request": "launch",
// "name": "Launch Program",
// "program": "${workspaceFolder}/index.js",
// "outFiles": [
// "${workspaceFolder}/**/*.js"
// ]
// }
// ]
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment