Skip to content

Instantly share code, notes, and snippets.

@albovieira
Created October 22, 2021 14:44
Show Gist options
  • Save albovieira/04941f20584389275568b00a29a87474 to your computer and use it in GitHub Desktop.
Save albovieira/04941f20584389275568b00a29a87474 to your computer and use it in GitHub Desktop.
[vscode] Debugs
{
"name": "Debug Tests JS",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"cwd": "${workspaceRoot}",
"args": ["--projects", "./tests/", "--runInBand"],
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
},
"console": "integratedTerminal",
},
{
"name": "JS API debug",
"type": "node",
"request": "launch",
"env": {
},
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/nodemon",
"program": "${workspaceFolder}/app.dev",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"skipFiles": ["<node_internals>/**", "${workspaceFolder}/node_modules/**"]
},
{
"name": "TS API Debug",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--nolazy",
"-r",
"ts-node/register",
"-r",
"tsconfig-paths/register",
"-r",
"${workspaceRoot}/api/entrypoint/index.ts"
],
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"console": "integratedTerminal"
},
{
"name": "Debug for lambda TS function",
"type": "node",
"request": "launch",
"args": [
"--nolazy",
"-r",
"ts-node/register",
"-r",
"tsconfig-paths/register",
"${workspaceFolder}/node_modules/.bin/sls",
"invoke",
"local",
"-f",
"functionName",
"--functionPath",
"src/bootstrap/serverless/functionName.default",
"--path",
"./tests/payloads/functionPayload.json"
],
"console": "integratedTerminal",
"skipFiles": [
"${workspaceFolder}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
},
{
"name": "Debug for lambda JS with Babel",
"protocol": "inspector",
"type": "node",
"request": "launch",
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/filename.js"],
"args": [
"${workspaceFolder}/node_modules/.bin/sls",
"invoke",
"local",
"-f",
"functioname",
"--path",
"./tests/payloads/functionPayload.json"
],
"console": "integratedTerminal",
"skipFiles": ["${workspaceFolder}/node_modules/**/*.js", "<node_internals>/**/*.js"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment