Is there some way to debug a serverless python lambda locally using sls invoke local
and have the vscode debugger actually attach to the invoked python process so that I can use breakpoints and the debugger functionality? So far I’ve tried making the following launch.json
file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Run lambda",
"runtimeExecutable": "/home/phii/.nvm/versions/node/v16.14.2/bin/node",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/sls",
"args": ["invoke", "local", "-f", "main", "--data", "{}"],
"console": "integratedTerminal"
}
]
}
Sadly, the vscode breakpoints I set inside my handler become gray and the interface declares them as “unbound”.