Skip to content

Instantly share code, notes, and snippets.

@SiarheiBokuts
Created December 3, 2021 10:41
Show Gist options
  • Save SiarheiBokuts/e577c355ee6cab5724972882b04fec0c to your computer and use it in GitHub Desktop.
Save SiarheiBokuts/e577c355ee6cab5724972882b04fec0c to your computer and use it in GitHub Desktop.
vsCode debug configs
{
// 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": "Debug current file",
"program": "${file}",
"cwd": "${workspaceFolder}/app",
"skipFiles": ["${workspaceFolder}/app/node_modules/**/*.js", "<node_internals>/**/*.js"]
},
{
"type": "node",
"request": "launch",
"name": "Test all",
"program": "${workspaceFolder}/app/node_modules/mocha/bin/_mocha",
"args": ["--timeout", "20000", "./{,!(node_modules)/**}/*.test.js"],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}/app",
"skipFiles": ["${workspaceFolder}/app/node_modules/**/*.js", "<node_internals>/**/*.js"],
"env": { "SAVE_GENERATED_FILES": "false" }
},
// run all typescript tests (need install ts-node npm package)
{
"type": "node",
"request": "launch",
"name": "Test All (.ts)",
"program": "${workspaceFolder}/app/node_modules/mocha/bin/_mocha",
"args": ["-r", "ts-node/register", "--timeout", "20000", "--colors", "${workspaceFolder}/**/*.test.ts"],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}/app",
"env": { "SAVE_GENERATED_FILES": "false" }
},
{
"type": "node",
"request": "launch",
"name": "Test current file",
"program": "${workspaceFolder}/app/node_modules/mocha/bin/_mocha",
"args": ["--timeout", "10000", "${file}"],
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}/app",
"skipFiles": ["${workspaceFolder}/app/node_modules/**/*.js", "<node_internals>/**/*.js"]
},
{
"name": "Debug index.local",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}/app",
"program": "${workspaceFolder}/debug.js",
"skipFiles": ["<node_internals>/**"],
"internalConsoleOptions": "openOnSessionStart",
"args": ["event=test"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment