使用Stackdriver调试Firebase云端函数 [英] Debugging Firebase Cloud Functions using Stackdriver

查看:103
本文介绍了使用Stackdriver调试Firebase云端函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注此文档,尝试调试我的firebase云端功能: https:/ /cloud.google.com/functions/docs/monitoring/debugging

首先
文档中给出的要求行是错误的所以我把它改成这样来编译:

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

在使用部署函数之后,firebase deploy --only函数堆栈驱动器调试视图中没有代码。任何想法如何使这项工作?



感谢:)

解决方案

目前,Firebase的Cloud Functions不会自动与Stackdriver共享代码。您需要通过Github,Bitbucket或Google Cloud Source Repository来获取代码。



调试Firebase的Cloud Functions 请参考我们的文档。我们将确保注意环境之间的差异。


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 :)

解决方案

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.

这篇关于使用Stackdriver调试Firebase云端函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆