Skip to content

Instantly share code, notes, and snippets.

@davidonlaptop
Last active August 13, 2023 20:12
Show Gist options
  • Save davidonlaptop/fc26297b5080920cc8624cdfbaa97af0 to your computer and use it in GitHub Desktop.
Save davidonlaptop/fc26297b5080920cc8624cdfbaa97af0 to your computer and use it in GitHub Desktop.
Visual Studio Code Hacks
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug a Jest file from a module in Git Subfolder",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/SUBFOLDER",
"runtimeArgs": [
"--inspect-brk", "${workspaceRoot}/SUBFOLDER/node_modules/.bin/jest",
"--runInBand",
"--coverage", "false",
"--testPathPattern", "TESTSUITE.test.ts",
"-t", "TEST NAME", // <- This is OPTIONAL
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Debug Current TypeScript File",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/SUBFOLDER",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"args": ["../${relativeFile}"],
"sourceMaps": true,
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Project API",
"type": "node",
"request": "launch",
"internalConsoleOptions": "openOnSessionStart",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
"skipFiles": [
"<node_internals>/**",
"node_modules/**"
],
"cwd": "${workspaceFolder}/project-api",
"program": "${workspaceFolder}/project-api/src/index.ts",
"args": [],
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment