Emulators Commands
Run Firebase services locally for development and testing. The emulator suite includes Firestore, Auth, Functions, Hosting, and Storage — test without touching production data.
5 commands
Pro Tips
Use 'firebase emulators:start --import=./seed --export-on-exit' to persist emulator data between sessions.
Access the emulator UI at http://localhost:4000 to visually inspect Firestore data, Auth users, and function logs.
Run 'firebase emulators:exec "npm test"' to start emulators, run tests, and auto-shutdown — perfect for CI.
Common Mistakes
Emulator data is lost on restart unless you use '--export-on-exit'. Always export if you need persistent test data.
Make sure your app connects to emulators in dev mode, not production Firebase. Check your initialization code.