Debugging golang in API mode

Hey folks,

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.

Unfortunately I am pretty new to golang and used to node.js - which is pretty easy to debug.

Thanks for your help :slight_smile:

Alex