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

# Debug and Trace | Monad

> The debug and trace JSON RPC methods allow developers to trace transaction execution and analyze contract calls on Monad with detailed step-by-step information.

Tracing and debugging on the Monad blockchain can be done by using the following methods:

<CardGroup cols={2}>
  <Card title="debug_traceTransaction" icon="angle-right" iconType="solid" href="/reference/monad-tracetransaction" horizontal />

  <Card title="debug_traceBlockByNumber" icon="angle-right" iconType="solid" href="/reference/monad-traceblockbynumber" horizontal />

  <Card title="debug_traceBlockByHash" icon="angle-right" iconType="solid" href="/reference/monad-traceblockbyhash" horizontal />

  <Card title="debug_traceCall" icon="angle-right" iconType="solid" href="/reference/monad-tracecall" horizontal />
</CardGroup>

These methods support multiple tracers including:

* **callTracer** — traces all calls made during execution
* **prestateTracer** — returns the state accessed during execution
* **stateDiffTracer** — returns state changes made during execution

This information can be used for:

* **Debugging** — understand why transactions failed or behaved unexpectedly.
* **Security analysis** — analyze contract interactions and fund flows.
* **Gas optimization** — identify expensive operations in contract execution.
* **Forensics** — trace transaction paths for audit and compliance.
