The debug and trace JSON RPC methods allow developers to trace transaction execution and analyze contract calls on Monad with detailed step-by-step information.
Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Tracing and debugging on the Monad blockchain can be done by using the following methods:
debug_traceTransaction
debug_traceBlockByNumber
debug_traceBlockByHash
debug_traceCall
These methods support multiple tracers including:
callTracer — traces all calls made during execution
prestateTracer — returns the state accessed during execution
stateDiffTracer — returns state changes made during execution
This information can be used for:
Debugging — understand why transactions failed or behaved unexpectedly.
Security analysis — analyze contract interactions and fund flows.
Gas optimization — identify expensive operations in contract execution.
Forensics — trace transaction paths for audit and compliance.