Firebase serve command helps a lot. But I just wondering is it possible to start in --inspect-brk mode so that I can try to debug into the code locally? If not, how you debug firebase functions? console.log only?
Asked
Active
Viewed 664 times
1 Answers
5
While the Firebase CLI tools are built with node.js, the firebase serve
command does currently not allow passing arguments for node
.
When developing non-trivial Cloud Functions for Firebase, I often put the majority of my code in a separate file (so not in index.js). So I could then also run that file with node ocr.js --inspect-brk
. For more on this approach, see my answer here: how to test Cloud Functions for Firebase locally on pc

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
thank you very much. This is actually how I debug currently. I will upvote you when I got 15 reputations. Please upvote my question so that I can upvote your answer. – user3423762 Jul 21 '17 at 16:50