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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With