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:1
Start search
Press
/ to enter search mode2
Enter query
Type your search term (contract ID, function name, error message)
3
Navigate results
n: Jump to next matchN: Jump to previous matchESC: Clear search
- 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
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
- 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