Flow Emulator
The Flow Emulator is a lightweight tool that emulates the behavior of the real Flow network for local development and testing.
Quick Start
Start the Flow Emulator with the CLI:
_10flow emulator
This starts a local Flow network with:
- gRPC server on port
3569 - REST API on
http://localhost:8888 - Admin API on port
8080
Common Options
_10# Start with verbose logging_10flow emulator --verbose_10_10# Set custom block time (e.g., 1 second between blocks)_10flow emulator --block-time 1s_10_10# Persist state between restarts_10flow emulator --persist
Development Tools
- Code Coverage: Add
--coverage-reportingflag and visithttp://localhost:8080/emulator/codeCoverage - Debugging: Use
#debugger()pragma in Cadence code for breakpoints
Installation
The emulator is included with the Flow CLI. Follow the installation guide to get started.
Additional Resources
For advanced configuration options, see the Flow Emulator repository.