Skip to main content
Launch an interactive trace viewer for bi-directional navigation through execution traces.

Usage

Description

The trace command provides an interactive terminal UI for exploring Soroban transaction execution traces. It allows you to:
  • Step forward and backward through execution
  • Jump to specific steps
  • Reconstruct state at any point
  • View memory and host state changes
  • Search for specific patterns
Trace files are typically generated by the erst debug command or can be exported from debugging sessions.

Examples

Arguments

string
required
Path to the trace file to load (JSON format)

Flags

string
Trace file to load (alternative to positional argument)Alias: -f
string
Color theme for the trace viewerOptions:
  • default - Standard color scheme
  • deuteranopia - Red-green color blindness
  • protanopia - Red color blindness
  • tritanopia - Blue-yellow color blindness
  • high-contrast - High contrast mode
If not specified, the theme is auto-detected from terminal settings.

Interactive controls

Once the trace viewer is running, use these keyboard shortcuts:
  • ↑/↓ - Navigate up/down through trace entries
  • ←/→ - Collapse/expand nodes
  • PageUp/PageDown - Scroll one page
  • Home/End - Jump to start/end
  • g - Go to specific step number
  • / - Open search prompt
  • n - Next search match
  • N - Previous search match
  • Esc - Clear search

Display

  • ? or h - Show help overlay
  • w - Toggle word wrap
  • c - Cycle color schemes

Control

  • q or Ctrl+C - Quit viewer
  • r - Refresh display

Output format

The trace viewer displays:
  • Contract calls: Function names and contract IDs with syntax highlighting
  • State changes: Ledger entry modifications
  • Events: Contract events and diagnostic events
  • Budget usage: CPU instructions, memory bytes, and operation counts
  • Errors: Detailed error messages and stack traces

Accessibility features

The trace viewer includes several accessibility features:
  • Color blindness support: Multiple color schemes optimized for different types of color vision deficiency
  • High contrast mode: Enhanced visibility for low-vision users
  • Screen reader hints: Semantic labels for navigation
  • Keyboard-only operation: No mouse required
  • debug - Generate trace files from transactions
  • profile - Convert traces to pprof format
  • export - Export trace data from sessions