I have a node
project created with Vue
using Firebase Hosting
, Cloud Functions
and Firestore
.
I can deploy locally with npm run build | firebase serve
. In the Vue
app I'm calling a Cloud Function with firebase.functions().httpsCallable('placeOrder').then((result) => {...})
A
Is it possible to make it so that the Function
call calls the Functions emulator
(running on port 5001
) and I can step through the code with breakpoints?
B
If it's not possible to call the emulator from the locally hosted site, how can I do Cloud Functions
development locally? I've read a bunch of articles, but they seem to be outdated. I can emulate a function with the Functions Framework and get the logs when I call it, but I'm not sure how to attach a debugger to it. Also, what happens if that Function
reads / writes Firestore
? Will it read / write the emulated one?
Cheers