Skip to main content
The interactive trace viewer provides a rich terminal UI for exploring Stellar smart contract execution traces. Navigate through complex call trees, search for specific events, and inspect contract state with keyboard shortcuts and visual highlighting.

Launching the viewer

Start the interactive trace viewer with the -i flag:
The viewer launches with:
  • Transaction summary (hash, total steps)
  • Automatic trap detection
  • Full keyboard navigation
  • Real-time terminal resizing

Example session

Stepping through execution

The viewer respects both event filters and the stdlib toggle, skipping filtered-out steps automatically.
When navigating, the viewer automatically skips Rust core::* traces if the stdlib filter is enabled.

Event type filtering

Cycle through event types with the f command:
Filter options cycle through:
  1. All steps (no filter)
  2. Traps only
  3. Contract calls only
  4. Host functions only
  5. Authorization events only

Standard library filtering

Toggle visibility of Rust core library traces:
This hides noisy core::* function calls, letting you focus on your contract logic:

Search functionality

The search engine uses fuzzy matching to find events:
1

Start search

Press / to enter search mode
2

Enter query

Type your search term (contract ID, function name, error message)
3

Navigate results

  • n: Jump to next match
  • N: Jump to previous match
  • ESC: Clear search
Search fields:
  • Contract IDs
  • Function names
  • Error messages
  • Event data
  • Event types
Search is case-insensitive by default and uses fuzzy matching, so β€œtransf” will match β€œtransfer”.

State inspection

Current state display

View the current execution state:
Shows:
  • Step number and timestamp
  • Operation type
  • Contract ID and function
  • Arguments and return values
  • WASM instructions
  • Error messages
  • Source file locations
  • GitHub links (when available)
  • Memory and host state summaries

State reconstruction

Reconstruct the full state at any step:
Reconstruction includes:
  • Complete host state
  • Memory contents
  • Storage entries
  • All contract data at that point

Trap inspection

When a memory trap is detected, view detailed information:
Trap details include:
  • Trap type (out of bounds, division by zero, etc.)
  • Exact instruction that failed
  • Source file and line number
  • Local variable values (with debug symbols)
  • Stack trace
Local variable inspection requires contracts to be compiled with debug symbols. See Source mapping for details.

List and navigation

List steps

Show steps around the current position:
Default count is 10:
View detailed navigation state:
Shows:
  • Total steps and current position
  • Active filters and matching counts
  • Navigation capabilities (can step back/forward)
  • Snapshot count
  • Trap detection status

Split-pane view

View trace and source code side by side:
The split pane displays:
  • Left: Current trace node with full details
  • Right: Source code context (if available)
The split-pane view requires source mapping information. Compile your contracts with --features debug to enable this.

Yanking (copying) raw XDR

Copy raw XDR values to the clipboard:
Useful for:
  • Inspecting exact XDR encoding
  • Debugging type conversions
  • External XDR analysis tools

Keyboard shortcuts reference

View all shortcuts in the viewer:

Complete shortcut list

Advanced features

Cross-contract call tracking

The viewer automatically highlights contract boundaries:

Terminal resizing

The viewer automatically reflows content when you resize your terminal:
  • Long contract IDs wrap intelligently
  • XDR strings adapt to available width
  • Tree structure maintains alignment

Match counter

When searching, see your position in results:

Tips and best practices

1

Start with filters

Use event type filters to focus on relevant steps. Most debugging starts with trap or error events.
2

Hide stdlib noise

Press S to hide Rust core library traces and focus on your contract logic.
3

Search strategically

Search for contract IDs, function names, or error keywords to quickly locate issues.
4

Reconstruct state

Use state reconstruction to see complete memory and storage at failure points.
5

Use split-pane for debugging

When you find an error, use split-pane view to see the exact source code that failed.

Next steps