Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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