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

> The debug_traceTransaction RPC method retrieves a detailed execution trace of a transaction, identified by the transaction's hash.

The `debug_traceTransaction` RPC method retrieves a detailed execution trace of a transaction, identified by the transaction's hash. This method is crucial for developers and analysts who need to understand the execution flow of a transaction, including all the operations (opcodes) executed, gas usage, and the transaction's outcome.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Request

To use `debug_traceTransaction`, send a POST request with a JSON RPC call in the body.

## Parameters

* **Transaction Hash** (`string`): The hash of the transaction to trace.

## Response

The response includes a detailed execution trace of the transaction, providing insights into each step of the transaction's execution.

* **result** (`object`): The detailed execution trace, including:
  * **structLogs** (`array`): An array of execution steps (opcodes) taken by the transaction.
  * **gas** (`integer`): The gas provided by the transaction.
  * **returnValue** (`string`): The return value of the transaction, if any.
  * **gasUsed** (`integer`): The total gas used by the transaction.
  * **failed** (`boolean`): Indicates whether the transaction failed.

## Use case

The `debug_traceTransaction` method is essential for:

* Developers debugging smart contract interactions.
* Analysts conducting forensic analysis of transactions.
* Tools and services that provide insights into Ethereum Virtual Machine (EVM) execution.


## OpenAPI

````yaml /openapi/base_node_api/debug_traceTransaction.json POST /2fc1de7f08c0465f6a28e3c355e0cb14
openapi: 3.0.0
info:
  title: debug_traceTransaction example
  version: 1.0.0
  description: >-
    This API example demonstrates how to use the debug_traceTransaction method
    to retrieve a detailed execution  trace of a transaction, identified by the
    transaction's hash.
servers:
  - url: https://base-mainnet.core.chainstack.com
security: []
paths:
  /2fc1de7f08c0465f6a28e3c355e0cb14:
    post:
      tags:
        - Debug Operations
      summary: debug_traceTransaction
      operationId: traceTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - id
                - params
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: debug_traceTransaction
                id:
                  type: integer
                  default: 1
                params:
                  type: array
                  items:
                    type: string
                  default:
                    - >-
                      0x317888c89fe0914c6d11be51acf758742afbe0cf1fdac11f19d35d6ed652ac29
      responses:
        '200':
          description: Detailed execution trace of the specified transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    properties:
                      structLogs:
                        type: array
                        items:
                          type: object
                        description: >-
                          An array of execution steps (opcodes) taken by the
                          transaction.
                      gas:
                        type: integer
                        description: The gas provided by the transaction.
                      returnValue:
                        type: string
                        description: The return value of the transaction, if any.
                      gasUsed:
                        type: integer
                        description: The total gas used by the transaction.
                      failed:
                        type: boolean
                        description: Indicates whether the transaction failed.
                    description: The detailed execution trace of the transaction.

````