> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/dotandev/hintents/llms.txt
> Use this file to discover all available pages before exploring further.

# erst trace

> Interactive trace navigation and debugging

Launch an interactive trace viewer for bi-directional navigation through execution traces.

## Usage

```bash theme={null}
erst trace <trace-file> [flags]
erst trace --file <trace-file> [flags]
```

## 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

<Note>
  Trace files are typically generated by the `erst debug` command or can be exported from debugging sessions.
</Note>

## Examples

<CodeGroup>
  ```bash Basic usage theme={null}
  erst trace execution.json
  ```

  ```bash Using file flag theme={null}
  erst trace --file debug_trace.json
  ```

  ```bash With custom theme theme={null}
  erst trace execution.json --theme high-contrast
  ```

  ```bash Deuteranopia-friendly colors theme={null}
  erst trace execution.json --theme deuteranopia
  ```
</CodeGroup>

## Arguments

<ParamField path="trace-file" type="string" required>
  Path to the trace file to load (JSON format)
</ParamField>

## Flags

<ParamField path="--file" type="string">
  Trace file to load (alternative to positional argument)

  Alias: `-f`
</ParamField>

<ParamField path="--theme" type="string">
  Color theme for the trace viewer

  Options:

  * `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.
</ParamField>

## Interactive controls

Once the trace viewer is running, use these keyboard shortcuts:

### Navigation

* `↑/↓` - 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

### Search

* `/` - 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

## Related commands

* [debug](/commands/debug) - Generate trace files from transactions
* [profile](/commands/profile) - Convert traces to pprof format
* [export](/commands/export) - Export trace data from sessions
