Skip to main content
Save, resume, and manage debugging sessions to preserve state across CLI invocations.

Usage

erst session <subcommand> [flags]

Description

Sessions store complete transaction data, simulation results, and analysis context, allowing you to:
  • Resume debugging work later
  • Share debugging context with team members
  • Build a history of investigated transactions
  • Analyze patterns across multiple sessions
Sessions are stored in ~/.erst/sessions/ by default and include transaction envelopes, simulation results, ledger state, and metadata.

Subcommands

  • save - Save the current debugging session
  • resume - Restore a saved session
  • list - View all saved sessions
  • delete - Remove a saved session

save

Save the current debug session state to disk for later resumption.

Usage

erst session save [flags]
You must run erst debug <tx-hash> first to create an active session.

Flags

--id
string
Custom session IDIf not specified, an ID is auto-generated from the transaction hash.

Examples

erst debug abc123...def
erst session save

resume

Restore a previously saved debug session by ID.

Usage

erst session resume <session-id>

Arguments

session-id
string
required
Session ID to resumeSupports:
  • Exact ID match
  • Partial ID prefix
  • Transaction hash
  • Fuzzy matching

Examples

erst session resume abc123

Output

When resuming a session, displays:
  • Session ID and creation time
  • Transaction hash and network
  • Last access time
  • Transaction envelope size
  • Simulation results summary
  • Event and log counts

list

List all saved debugging sessions, ordered by most recently accessed.

Usage

erst session list

Output

Displays a table with:
  • Session ID
  • Network (testnet, mainnet, etc.)
  • Last accessed timestamp
  • Transaction hash

Example output

Saved sessions (3):

ID                   Network      Last Accessed        Transaction Hash
--------------------------------------------------------------------------------
my-debug-session     testnet      2026-03-01 14:23     abc123def456...
token-transfer       mainnet      2026-02-28 09:15     789abc012def...
failed-mint          testnet      2026-02-27 16:42     345678901abc...

delete

Remove a saved debugging session by ID.

Usage

erst session delete <session-id>
This action cannot be undone. The session data will be permanently deleted.

Arguments

session-id
string
required
Session ID to deleteSupports the same flexible matching as resume.

Example

erst session delete abc123

Session lifecycle

Sessions are automatically cleaned up based on:
  • TTL: Default 30 days (configurable)
  • Max sessions: Default 50 (configurable)
  • Cleanup strategy: Least Recently Used (LRU)
Cleanup runs automatically during save, resume, and list operations.

Session data

Each session stores:
  • Transaction data: Envelope XDR and result meta XDR
  • Simulation results: Events, logs, diagnostic events
  • Ledger state: All ledger entries accessed during execution
  • Metadata: Network, timestamp, schema version
  • Request context: Original simulation request parameters
  • debug - Create sessions from transactions
  • export - Export session data
  • cache - Manage cached transaction data