Skip to content

Function execution trace #11

@Anmol-Dhiman

Description

@Anmol-Dhiman

Function Call Trace UI using debug_traceTransaction

To build a UI that visualizes the function call execution flow, leverage the debug_traceTransaction RPC method. This method returns a detailed trace of EVM execution steps, with a sample output as shown below:

{
  "failed": false,
  "gas": 26709,
  "returnValue": "",
  "structLogs": [
    {
      "pc": 0,
      "op": "PUSH1",
      "gas": 5481,
      "gasCost": 3,
      "depth": 1,
      "stack": []
    },
    ...
  ]
}

Note : Ensure that Anvil is running with the --steps-tracing flag enabled to provide comprehensive step-by-step execution logs.
Use these traces to construct a UI for visualizing function call execution flow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions