Debugging AWS SAM
This took a few to get just right, for one the command needs to be in the correct order
sam local invoke --event fixtures/latest_not_working.json -d 5858 GithubPushes
From here it gave me the output I was looking for:
sam local invoke --event fixtures/latest_not_working.json -d 5858 GithubPushes 2018/05/07 06:49:46 Successfully parsed template.yaml 2018/05/07 06:49:46 Connected to Docker 1.37 2018/05/07 06:49:46 Fetching lambci/lambda:nodejs8.10 image for nodejs8.10 runtime... nodejs8.10: Pulling from lambci/lambda Digest: sha256:a53fceb64e2339332dbc4117be8ec270f46fbe28d564499f1cf73035a1c5854e Status: Image is up to date for lambci/lambda:nodejs8.10 2018/05/07 06:49:47 Invoking index.push (nodejs8.10) 2018/05/07 06:49:47 Mounting /Users/alfrednutile/Code/foo as /var/task:ro inside runtime container Debugger listening on ws://0.0.0.0:5858/ed41670e-8cdf-4f32-95d1-1be539fce269 For help see https://nodejs.org/en/docs/inspector Debugger attached.
So now I could open up Google Inspector here
And I could add to it
Then the debugger would open as needed after I first click