Skip to content

Instantly share code, notes, and snippets.

@danfoust
Created April 13, 2022 01:27
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 danfoust/9354bf787819f26be7f074aaa492ba73 to your computer and use it in GitHub Desktop.
Save danfoust/9354bf787819f26be7f074aaa492ba73 to your computer and use it in GitHub Desktop.
Serverless Offline launch.json for breakpoints
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Serverless Offline",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/backend",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "debug"]
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Serverless Offline",
"type": "node",
"request": "launch",
"cwd": "${workspaceRoot}/backend",
"runtimeExecutable": "npm",
"runtimeArgs": [
"set",
"SLS_DEBUG=*",
"&&",
"node",
"--inspect",
"./node_modules/serverless/bin/serverless",
"offline",
"-s=dev",
"--noPrependStageInUrl"
]
}
]
}
{
"scripts": {
"start": "sls offline --noPrependStageInUrl",
"debug": "set SLS_DEBUG=* && node --inspect ./node_modules/serverless/bin/serverless offline -s dev --noPrependStageInUrl"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment