Skip to content

edb-rs/edb

Repository files navigation

EDB  ·  The Ethereum Project Debugger

To our knowledge, the first Ethereum smart-contract debugger that can theoretically achieve 100% accurate source-to-bytecode mapping.

Source-level time-travel debugger for Ethereum smart contracts.

Install Quickstart Online Tutor Why EDB? Sponsors Q&A

EDB bridges the gap between high-level Solidity code and low-level EVM execution, providing four essential debugging features that have been missing from the Ethereum ecosystem:

  • 🧭 Step-by-step execution at the source code level
  • 🧠 Local variable value inspection
  • 🧮 Custom expression evaluation during debug execution
  • 🎯 Breakpoints & watchpoints for fine-grained control

⚠️ Note: EDB is currently under active development. Features and APIs may change as we continue to improve the debugging experience.

EDB Demo

✨ Time-travel through your Solidity code with a full TUI debugger.

Installation

One-line Install

curl -sSL https://install.edb.sh | bash

The installer downloads a pre-built binary for your platform, so no Rust or Bun toolchain is required.

Build from Source

Prerequisites

  • Rust (stable, 2024 edition): rustup.rs
  • Bun: required to build the embedded web UI
# Clone the repository
git clone https://github.com/edb-rs/edb
cd edb

# Build all components (requires bun on PATH; see Prerequisites)
cargo build --release

# Install binaries
cargo install --path crates/edb
cargo install --path crates/rpc-proxy
cargo install --path crates/tui

Quickstart

Debug an On-Chain Transaction

Debug any transaction from mainnet or testnets:

# Debug a transaction with the browser UI (default)
edb --rpc-urls <RPC_ENDPOINTS> replay 0x5bedd885ff628e935fe47dacb6065c6ac80514a85ec6444578fd1ba092904096

# …or stay in the terminal with the TUI
edb --rpc-urls <RPC_ENDPOINTS> --ui=tui replay 0x5bedd885ff628e935fe47dacb6065c6ac80514a85ec6444578fd1ba092904096

<RPC_ENDPOINTS> is a comma-separated list of Ethereum RPC URLs (public endpoints like Infura/Alchemy, or a local node). EDB queries these to fetch the on-chain state needed to replay the transaction; more endpoints means faster replay.

If none is provided, EDB falls back to the ten most popular public RPC endpoints, which may be slow and unreliable. Bring your own keys for the best experience.

Web UI (default)

Without any extra flag, EDB opens a browser-based debugger that shares the engine's port (no extra binary). Both dark and light themes ship by default.

EDB Web UI screenshot (dark theme)

EDB Web UI screenshot (light theme)

Click the ? button in the status bar (or press the help shortcut) to view the keybinding & terminal-command reference.

Terminal UI (--ui=tui)

edb --ui=tui replay <tx> launches the keyboard-driven TUI, useful over SSH or in environments without a browser:

EDB TUI screenshot

Type ? in the TUI to view the help page.

For development setup and architecture details, see DEV.md and ARCH.md.

Why EDB?

Traditional Ethereum debugging tools operate at the bytecode level, making it nearly impossible to understand what's happening in your Solidity code.

Tools like Remix IDE's debugger, Foundry's forge debug, and Hardhat's console debugger show you opcode-by-opcode execution, stack traces, and raw memory dumps. While powerful, these tools require developers to mentally map between high-level Solidity constructs and low-level EVM operations, which is, however, a complex and error-prone process.

The fundamental challenge: While Solidity compilers generate source maps to link bytecode back to source code, this mapping is fragile and often imprecise, especially for optimized contracts.

Existing debuggers rely on these source maps to display which source line corresponds to each opcode, but they still can't reliably reconstruct high-level variable values, function call contexts, or complex data structures from raw EVM state. The source maps frequently point to wrong lines or become completely unreliable when compiler optimizations are enabled.

EDB's solution: Instead of trying to decode bytecode back to source level, we instrument your Solidity contracts at the source code level. By inserting strategic debugging hooks during compilation, EDB creates contracts that can report their own state in terms of your original high-level constructs.

What makes EDB different:

  • True source-level debugging - Step through your actual Solidity code, not disassembled bytecode
  • Reliable variable inspection - Access any local variable, struct field, or array element with confidence
  • Expression evaluation - Evaluate arbitrary Solidity expressions against the current execution state
  • Time-travel capabilities - Navigate backward and forward through execution history
  • Breakpoints & watchpoints - Set conditional and unconditional breakpoints, and watchpoints on expressions

Community

Join our Telegram Q&A group to ask questions, share insights, and connect with other EDB developers:

👉 Join the EDB Q&A Group on Telegram

Sponsors



EDB is free and open-source, and we're genuinely short on funding to keep it growing. If EDB has saved you time, please consider chipping in. Two ways:

Sponsor as an individual via GitHub Sponsors   Sponsor as a company, email Zhuo

Company sponsorships are coordinated through DAPLab @ Columbia University.

Packages

 
 
 

Contributors