Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

Any good suggestions on debugging cloud functions #459

Open marktani opened 6 years ago

marktani commented 6 years ago

Issue by likeben Wednesday Jan 17, 2018 at 05:58 GMT Originally opened as https://github.com/graphcool/prisma/issues/1662


I mean how to test and debug my cloud functions. When I write a 'console.log(XXX)' in my code, I don't know where I can see the result. I try the 'graphcool-framework logs' command, but it only show the event object of each request. I also use the 'graphcool-framework invoke-local' command to execute the function, it doesn't work well either.

marktani commented 6 years ago

Comment by jdheeter Wednesday Jan 17, 2018 at 07:18 GMT


I spent many hours debugging graphcool-framework managed functions and had many problems and unexplained issues come up which I was unable to resolve. The feature has been dropped in the latest version, so I doubt that the team will improve the functionality. I ended up using the cli at serverless.com and the webhook functionality in graphcool to point at serverless api endpoints. It's a bit more complex to set up but probably more reliable and robust in the long term.

omatrot commented 6 years ago

I think that we should at least be able to access the AWS lambda logs. There is also an AWS Lambda Debugger.

typeofgraphic commented 6 years ago

Is using a local docker instance the best option for debugging cloud function logs at this point?