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

> Ethereum debug and trace API methods for inspecting smart contract execution, analyzing gas usage, and tracing transactions on Chainstack nodes.

Developers can access the debug and trace tools on the Ethereum blockchain with the following methods:

<CardGroup cols={2}>
  <Card title="debug_traceBlockByHash" icon="angle-right" iconType="solid" href="/reference/ethereum-traceblockbyhash" horizontal />

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

  <Card title="debug_traceTransaction" icon="angle-right" iconType="solid" href="/reference/ethereum-tracetransaction" horizontal />

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

  <Card title="trace_transaction" icon="angle-right" iconType="solid" href="/reference/ethereum-trace_transaction" horizontal />

  <Card title="trace_block" icon="angle-right" iconType="solid" href="/reference/ethereum-trace_block" horizontal />
</CardGroup>

## Pre-built native tracers

<Info>
  ### Custom JavaScript tracers need a dedicated node

  The tracers listed below are native (built-in) tracers—you select one by name, and they run on all Ethereum nodes. Custom JavaScript tracers, where you pass raw JavaScript as the `tracer`, are available as customized solutions on the [Enterprise plan](https://chainstack.com/pricing/) on [dedicated nodes](/docs/dedicated-node).
</Info>

Developers can customize the type of tracing using various debug and trace methods, and there are numerous pre-built tracers available to choose from. Here is a list of the pre-built tracers that can be utilized:

## `4byteTracer`

This tracer looks for function signatures that are 4 bytes long during contract execution and gathers information about the method identifiers and the size of the provided data. This information can be helpful in matching a signature against the data size.

## `callTracer`

This tracer extracts information about all internal calls made by a transaction, providing visibility into how contracts interact with each other.

## `prestateTracer`

This tracer returns sufficient information about an account to create a local execution of the transaction. This procedure runs the given transaction again and monitors every aspect of the state that is modified or accessed during execution.

## `noopTracer`

This tracer does nothing but respond with a blank object. This a no operations tracer for testing setup.

## `flatCallTracer`

This tracer returns call traces in the flat, Parity-style format—the same structure as the `trace_*` namespace. Instead of the nested tree produced by `callTracer`, it returns a flattened list of call frames, which is convenient for tooling built around the OpenEthereum/Parity trace format.

<Note>Available on Ethereum only.</Note>

## `muxTracer`

This tracer runs several native tracers in a single pass and returns their combined output. Pass a `tracerConfig` object keyed by tracer name—for example, `callTracer` and `prestateTracer`, each with its own configuration—and the response is an object keyed by each tracer's name. This avoids re-executing the transaction once per tracer.

<Note>Available on Ethereum only.</Note>

## `erc7562Tracer`

This tracer enforces the [ERC-7562](https://eips.ethereum.org/EIPS/eip-7562) account-abstraction validation rules, tracking opcode and storage access during the validation phase of an ERC-4337 user operation. Bundlers use it to detect rule violations before a user operation enters the mempool.

<Note>Available on Ethereum only.</Note>

## Custom JavaScript tracers

JavaScript-based tracers can be created through various approaches, allowing them to interact with transaction information in diverse ways. By providing a JavaScript formula along with the tracking option when employing any of the available tracking techniques, users can craft tailor-made trackers to suit their specific requirements.

Find a guide to [Custom JS tracing | Ethereum](/reference/custom-js-tracing-ethereum) on the next page.
