I was debugging a function following this tutorial...
# help
j
I was debugging a function following this tutorial: https://serverless-stack.com/examples/how-to-debug-lambda-functions-with-visual-studio-code.html I stopped debugging. But now, when I try to run the function without debbuging I'm getting this error:
Client not connected. make sure "sst start" is running.
What should I do?
t
Is sst start running? haha
and did you try giving it a restart?
j
I stopped it using the VS Code stop button. But, apparently it doesn't work.
t
If you stopped it you need to start it again for it to work
j
But when I don't want to debug anymore what should i do? Should I create two stacks/stages? One stage for debug?
r
You need to run sst deploy after completing the debug session to reinstate the lambdas within AWS
t
Ah I see. Yeah so if you're using the latest SST, on first run it'll prompt you for a stage name for your personal environment. It's ok to leave sst start in the personal environment because no one else is using it. Then you can use a different stage, eg
---stage=production
for real deployments
Checkout this doc for a full writeup: https://docs.serverless-stack.com/working-with-your-team
j
Thanks!