---
title: Debug
description: Re-execute transactions and resolve DWARF-backed traces with thru debug
source_url:
  html: https://thru.org/docs/cli-reference/debug-commands/
  md: https://thru.org/docs/cli-reference/debug-commands.md
---

# Debug

Use `thru debug` when the task is diagnosis rather than normal transaction submission.

## Commands

| Command | Use it for |
| - | - |
| `re-execute <signature>` | Re-run a transaction in a simulated environment. |
| `resolve —elf <elf> (—response <file> or —signature <sig>)` | Resolve DWARF debug info into a source-level report. |

## High-Signal Flags

| Flag | Applies to | Why it matters |
| - | - | - |
| `--include-state-before` | `re-execute` | Include account state snapshots before execution. |
| `--include-state-after` | `re-execute` | Include account state snapshots after execution. |
| `--include-account-data` | `re-execute` | Include full account data in snapshots. |
| `—output-trace <FILE>` | `re-execute` | Save VM execution trace to a file. |
| `--include-memory-dump` | `re-execute` | Include stack and heap dump data. |
| `—elf <PATH>` | `resolve` | Point to a program ELF with DWARF info. |
| `--response` / `--signature` | `resolve` | Choose either a saved response or a live signature lookup. |

## Minimal Patterns

```bash
thru debug re-execute ts...[signature] --include-state-after
thru debug resolve --elf ./build/thruvm/bin/my_program_c.elf --signature ts...[signature]
```

## Notes

- Use `resolve` only when you have a debug-built ELF with DWARF info available.
- This family is the right place to go after a failing transaction when plain CLI errors are not enough.
