Skip to content

Instantly share code, notes, and snippets.

@jotafeldmann
Created December 2, 2020 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jotafeldmann/3f4f93e09f12ed2f1b366925d60f6e73 to your computer and use it in GitHub Desktop.
Save jotafeldmann/3f4f93e09f12ed2f1b366925d60f6e73 to your computer and use it in GitHub Desktop.
Debug TypeScript Node app and Jest TypeScript tests for Visual Studio Code (VSC)
{
// Put this file inside ${workspaceFolder}/.vscode/launch.json
// 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-terminal",
"request": "launch",
"name": "Debug TS unity tests",
"command": "node --inspect node_modules/.bin/jest --watch --runInBand"
},
{
"type": "node-terminal",
"request": "launch",
"name": "Debug TS e2e tests",
"command": "node --inspect node_modules/.bin/jest --config ./test/jest.config.js --watch --runInBand"
},
{
"type": "node-terminal",
"request": "launch",
"name": "Debug TS node app",
"command": "npx nodemon --exec node --nolazy -r ts-node/register -r tsconfig-paths/register ${workspaceFolder}/src/main.ts",
"sourceMaps": true,
"envFile": "${workspaceFolder}/.env",
"cwd": "${workspaceRoot}",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"],
"internalConsoleOptions": "neverOpen"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment