When working with EVM blockchains, developers often need deep insights into what actually happens under the hood of a smart contract execution. High-level transaction receipts are rarely enough—especially when debugging complex interactions, analyzing gas consumption, or reverse-engineering contract logic. This is where the Debug API, and specifically the Debug_traceTransaction method, becomes an essential tool.
In this guide, we’ll break down how it works, what it returns, and how to use it with an Ethereum archive node through NOWNodes.
What Is Debug_traceTransaction?
Debug_traceTransaction is a Debug API method that allows you to trace the execution of a specific transaction within an EVM chain.
Unlike standard RPC calls—which only return finalized data—this method provides an instruction-level breakdown of the transaction execution path:
- all CALLs, DELEGATECALLs, STATICCALLs
- intermediate states
- gas usage at each step
- contract inputs/outputs
- revert reasons
- internal transactions
- detailed execution traces via tracers (e.g.,
callTracer,prestateTracer,4byteTracer, custom tracers)
To access this information reliably, you need an archive node because traces depend on full historical state. NOWNodes supports Ethereum archive nodes, giving developers the depth and speed required for intensive debugging tasks.
Why Do Developers Use Debug Tracing?
Debug tracing is crucial for:
Smart Contract Debugging
See precisely where a contract reverted, which internal call failed, and why.
Gas Profiling
Understand gas consumption at each execution step and optimize smart contract logic.
Internal Transaction Analysis
View internal value transfers, contract calls, and low-level operations not available in standard logs.
Security Research
Analyze attack vectors, MEV strategies, and unexpected internal behavior.
Forensics & Auditing
Trace transaction flow for incident response or comprehensive audits.
How to Call Debug_traceTransaction Using NOWNodes
Below is a production-ready example using the Debug API on an Ethereum endpoint.
You can use the same structure for any supported EVM network.
Example Request
curl -L \
--request POST \
--url 'https://arbitrum.nownodes.io/' \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0x9e63085271890a141297039b3b711913699f1ee4db1acb667ad7ce304772036b",
{
"tracer": "callTracer"
}
],
"id": 1
}'
Typical Successful Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "CALL",
"from": "0x688c1de81ce07a698679928ae319bbe503da1a5d",
"to": "0xf15176bc2a8d95102e21641fc0c3b1a9990d2d2d",
"value": "0x0",
"gas": "0x226c9",
"gasUsed": "0x1a529",
"input": "0xaea01419000000000000000000...",
"output": "text",
"error": "text",
"revertReason": "text",
"calls": [
{}
]
}
}
This output includes:
- The top-level call and all nested calls
- Raw input data (helpful for ABI decoding)
- Gas usage
- Revert reasons (if the tx failed)
- Internal contract calls
Best Practices for Using Debug_traceTransaction
1. Use a specific tracer
Tracers let you extract only the data you need:
- callTracer → internal calls structure
- 4byteTracer → function signatures
- prestateTracer → pre-execution state
- custom JS tracers → advanced analysis
2. Always run against an archive node
Without an archive node, historical block state may be unavailable.
3. Cache frequent traces
If you’re analyzing the same hashes (e.g., for audits or dashboards), caching improves performance.
Build With Confidence Using Debug API on NOWNodes
Whether you’re building a block explorer, conducting smart contract audits, or developing developer tooling, the Debug API—and especially debug_traceTransaction—gives you unparalleled insight into EVM blockchain execution.
- Archive-level access
- 115+ blockchains
- Fast response times
- 99.95% uptime
- Scalable infrastructure for production apps
Start debugging smarter, faster, and at enterprise scale.



