Overview
Record step-by-step EVM execution with opcode, call, and pre-state tracers.
Last updated
Record step-by-step EVM execution with opcode, call, and pre-state tracers.
mega-evme can record detailed execution traces during EVM runs. Traces are useful for debugging reverts, analyzing gas consumption, and understanding call flow.
Add --trace to any command to enable tracing:
mega-evme run 0x60016000526001601ff3 --traceBy default, this uses the opcode tracer. Use --tracer to pick a different tracer.
These flags apply to all tracers:
--trace
false
Enable tracing
--trace.output <PATH>
stdout
Write trace output to a file instead of the console
--tracer <TRACER>
opcode
Select which tracer to use
Trace output is JSON. When --trace.output is not set, the trace is printed to stdout after the execution result. When --trace.output is set, the trace is written to the specified file and only the execution result appears on stdout.
Last updated
# Trace to file
mega-evme run 0x60016000526001601ff3 \
--trace --tracer opcode \
--trace.output trace.json
# Trace to stdout (default)
mega-evme run 0x60016000526001601ff3 --trace