Launching the viewer
Start the interactive trace viewer with the-i flag:
- Transaction summary (hash, total steps)
- Automatic trap detection
- Full keyboard navigation
- Real-time terminal resizing
Example session
Navigation commands
Stepping through execution
When navigating, the viewer automatically skips Rust
core::* traces if the stdlib filter is enabled.Filtering and search
Event type filtering
Cycle through event types with thef command:
- All steps (no filter)
- Traps only
- Contract calls only
- Host functions only
- Authorization events only
Standard library filtering
Toggle visibility of Rust core library traces:core::* function calls, letting you focus on your contract logic:
Search functionality
The search engine uses fuzzy matching to find events:
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:- 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:- 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 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
List and navigation
List steps
Show steps around the current position:Navigation info
View detailed navigation state:- 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:- 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:- Inspecting exact XDR encoding
- Debugging type conversions
- External XDR analysis tools
Keyboard shortcuts reference
View all shortcuts in the viewer:Complete shortcut list
| Key | Action |
|---|---|
n, next, forward | Step forward |
p, prev, back | Step backward |
j <step>, jump <step> | Jump to specific step |
s, show, state | Show current state |
S | Toggle stdlib filter |
f, filter | Cycle event type filter |
/ | Start search |
n (in search) | Next match |
N (in search) | Previous match |
ESC | Clear search |
r, reconstruct | Reconstruct state |
t, trap | Show trap info |
l <count>, list <count> | List steps |
i, info | Show navigation info |
sp, split | Split-pane view |
e, expand | Expand current node |
c, collapse | Collapse current node |
E | Toggle expand/collapse all |
y <a/r>, yank <a/r> | Copy raw XDR |
?, h, help | Show help |
q, quit, exit | Exit viewer |
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
Start with filters
Use event type filters to focus on relevant steps. Most debugging starts with trap or error events.
Search strategically
Search for contract IDs, function names, or error keywords to quickly locate issues.
Next steps
- Learn about Source mapping to see Rust code in traces
- Use Performance profiling to identify slow operations
- Set up Offline analysis to save and replay traces