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

> Arc API method that returns a detailed trace of a transaction's execution. Reference for debug_traceTransaction on Arc via Chainstack.

Arc API method that returns a detailed trace of a transaction's execution. This is useful for debugging failed transactions or understanding contract behavior.

## Parameters

* `transactionHash` — the hash of the transaction to trace
* `tracerConfig` — (optional) tracer configuration object:
  * `tracer` — tracer type (e.g., `callTracer`, `prestateTracer`)
  * `timeout` — (optional) timeout for the trace

## Response

* `result` — the trace result object, format depends on the tracer used

## `debug_traceTransaction` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const traceTransaction = async (txHash) => {
      const trace = await provider.send("debug_traceTransaction", [
        txHash,
        { tracer: "callTracer" }
      ]);
      console.log(JSON.stringify(trace, null, 2));
    };

  traceTransaction("0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2");
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"
  web3 = Web3(Web3.HTTPProvider(node_url))

  result = web3.provider.make_request("debug_traceTransaction", [
      "0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2",
      {"tracer": "callTracer"}
  ])
  print(result['result'])
  ```

  ```bash cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "debug_traceTransaction",
      "params": ["0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2", {"tracer": "callTracer"}],
      "id": 1
    }'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/arc_node_api/debug_and_trace/debug_traceTransaction.json POST /
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.0
  description: This is an API for interacting with a Chainstack node.
servers:
  - url: https://arc-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: debug_traceTransaction
      operationId: debug_traceTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceTransaction
                params:
                  type: array
                  default:
                    - >-
                      0xfc48f7c70e8ffaa46b1110dc43f32e90f65434a0949edab384d066c820c57ee2
                    - tracer: callTracer
      responses:
        '200':
          description: Returns the result of debug_traceTransaction.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    properties:
                      from:
                        type: string
                      gas:
                        type: string
                      gasUsed:
                        type: string
                      to:
                        type: string
                      input:
                        type: string
                      output:
                        type: string
                      error:
                        type: string
                      revertReason:
                        type: string
                      calls:
                        type: array
                        items:
                          type: object
                          properties:
                            from:
                              type: string
                            gas:
                              type: string
                            gasUsed:
                              type: string
                            to:
                              type: string
                            input:
                              type: string
                            output:
                              type: string
                            error:
                              type: string
                            revertReason:
                              type: string
                            calls:
                              type: array
                              items:
                                type: object
                                properties:
                                  from:
                                    type: string
                                  gas:
                                    type: string
                                  gasUsed:
                                    type: string
                                  to:
                                    type: string
                                  input:
                                    type: string
                                  type:
                                    type: string
                            value:
                              type: string
                            type:
                              type: string
                      value:
                        type: string
                      type:
                        type: string
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  from: '0x19d7cf8ea0ce468417d1eda365a222a9dcbc7d27'
                  gas: '0x927c0'
                  gasUsed: '0xc550'
                  to: '0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f'
                  input: >-
                    0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000
                  output: >-
                    0x4e487b710000000000000000000000000000000000000000000000000000000000000012
                  error: execution reverted
                  revertReason: division or modulo by zero
                  calls:
                    - from: '0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f'
                      gas: '0x89bee'
                      gasUsed: '0x5c52'
                      to: '0xd206ac7fef53d83ed4563e770b28dba90d0d9ec8'
                      input: >-
                        0xb61d27f60000000000000000000000001ff9c167b50d05910ffdadb82d3d2da4508330ca0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000040a617bee00000000000000000000000000000000000000000000000000000000
                      output: >-
                        0x4e487b710000000000000000000000000000000000000000000000000000000000000012
                      error: execution reverted
                      revertReason: division or modulo by zero
                      calls:
                        - from: '0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f'
                          gas: '0x7530'
                          gasUsed: '0xf1'
                          to: '0x1ff9c167b50d05910ffdadb82d3d2da4508330ca'
                          input: >-
                            0x01ffc9a701ffc9a700000000000000000000000000000000000000000000000000000000
                          type: STATICCALL
                        - from: '0xd011948bd0d6d433d4ba6df9dc44eb9a2bfa555f'
                          gas: '0x82a56'
                          gasUsed: '0xb84'
                          to: '0x1ff9c167b50d05910ffdadb82d3d2da4508330ca'
                          input: '0x0a617bee'
                          output: >-
                            0x4e487b710000000000000000000000000000000000000000000000000000000000000012
                          error: execution reverted
                          revertReason: division or modulo by zero
                          value: '0x0'
                          type: CALL
                      value: '0x0'
                      type: DELEGATECALL
                  value: '0x0'
                  type: CALL

````