> ## 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 with stylusTracer

Arbitrum API method that provides a native tracer called `stylusTracer` for debugging Stylus contracts. This method returns detailed execution traces of transactions involving Stylus contracts by capturing metadata for each HostIO (calls the WasmVM makes to read and write data in the EVM). Combined with the contract's source code, this gives developers complete visibility into transaction execution for debugging purposes.

<Note>
  **Available on customized dedicated nodes only**

  Custom JavaScript tracers are available as customized solutions on the [Enterprise plan](https://chainstack.com/pricing/) on [dedicated nodes](/docs/dedicated-node).
</Note>

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

## Parameters

* `hash` — the hash identifying a transaction.
* `object` — (optional) an object identifying the type of tracer and its configuration:
  * `stylusTracer` — tracer that captures metadata for each HostIO executed during a Stylus transaction.

## JSON-RPC example

```shell theme={"system"}
curl https://arbitrum-mainnet.core.chainstack.com/d44bf5f1b27688507d0ccd50bf263e83 \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0x3c9329b765d88c03d18f87dc1f2b5138c89d9a415d5c73dc7827b87aca176c8e", {"tracer": "stylusTracer"}], "id":1,"jsonrpc":"2.0"}'
```

## Response types

### `stylusTracer` response

* `object` — the `stylusTracer` traces object containing an array of HostIO metadata:
  * `name` — name of the executed HostIO.
  * `args` — arguments of the HostIO encoded as hex.
  * `outs` — outputs of the HostIO encoded as hex.
  * `startInk` — amount of Ink before executing the HostIO.
  * `endInk` — amount of Ink after executing the HostIO.
  * `address` — for \*call HostIOs, the address of the called contract.
  * `steps` — for \*call HostIOs, the steps performed by the called contract.

## Use case

A key use case for the `debug_traceTransaction` method with `stylusTracer` is debugging failed Stylus contract transactions. The tracer provides detailed information about each HostIO executed during the transaction, allowing developers to:

1. Track the exact sequence of operations
2. Monitor Ink consumption
3. Identify where failures occurred
4. Analyze interactions with other contracts

This data can be used with the contract source code to understand transaction behavior and diagnose issues.
