问题
I've setup the Firebase local emulator suite and have my iOS application hitting the local server. I'm wanting to verify whether some cloud functions (on document write) are executing as expected, but I can't validate whether the data is there or not. I can do this by running deploy and checking the Firebase console database tab, but that's only a viable solution during development. I suppose I could also do a get from the iOS client, but hoping there's an easier way to just view the JSON.
The CLI prints out a number of local URLs but none have any data I can see:
✔ hub: emulator hub started at http://localhost:4400
✔ functions: functions emulator started at http://localhost:5001
i firestore: firestore emulator logging to firestore-debug.log
✔ firestore: firestore emulator started at http://localhost:8080
i firestore: For testing set FIRESTORE_EMULATOR_HOST=localhost:8080
回答1:
On May 21, 2020 the Firebase team has introduced the Emulator UI. One of the features available is data management for Firestore and Realtime Database
Basically you have to make sure to have Firebase CLI at least version 8.4.0 installed
Once you have initialised your project with firebase init, you'll be able to access the Emulator UI in your web browser at localhost:4000 after executing the following command
firebase emulators:start
来源:https://stackoverflow.com/questions/61704839/how-can-i-view-database-data-when-running-firestore-local-emulator