1

with SAM I am able to run the API and Debug with VS Code or GoLand while using Postman for example.

sam local start-api -d 8997 --debugger-path ./scripts/linux --region us-east-1

While using serverless I found this way for debugging:

docker run --rm -p 8997:8997 -ti -v $PWD/bin/:/var/task -v $PWD/scripts/linux:/tmp/lambci_debug_files lambci/lambda:go1.x -debug=true -delvePort=8997 <function> "<event.json>"

(found this here: https://github.com/msolimans/generator-sls)

Debugging only seems to work if I am creating an event.json for my function and pass it. It would be nice if I could debug the function with a current request made via browser or postman.

I asked in sls-offline github and serverless forum - I haven't gotten any answer :(

Thanks for your help :)

Alex

Cluster2a
  • 65
  • 2
  • 6

0 Answers0