Skip to main content

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:


_10
flow 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
_10
flow emulator --verbose
_10
_10
# Set custom block time (e.g., 1 second between blocks)
_10
flow emulator --block-time 1s
_10
_10
# Persist state between restarts
_10
flow emulator --persist

Development Tools

  • Code Coverage: Add --coverage-reporting flag and visit http://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.