3
votes

I am following this doc to try to debug my firebase cloud function: https://cloud.google.com/functions/docs/monitoring/debugging

First of all the The require line given in the doc was wrong so I changed it to this to make it compile:

require('@google-cloud/debug-agent').start();

Also after implementing this and deploying the functions using firebase deploy --only functions there is no code in stack drive debug view. Any idea how to make this work?

Thanks :)

1
I'll make sure to fix the Firebase docs + call this out.James Daniels

1 Answers

3
votes

Currently, Cloud Functions for Firebase do not share their code with Stackdriver automatically. You'll need to source your code via Github, Bitbucket, or a Google Cloud Source Repository.

While debugging Cloud Functions for Firebase please refer to our documentation. We'll make sure to note any differences between the environments.