Debugging
Chapter 49: Debugging Tools & Techniques
Section titled “Chapter 49: Debugging Tools & Techniques”Overview
Section titled “Overview”This chapter covers tools and techniques for debugging blockchain nodes.
49.1 pprof Profiling
Section titled “49.1 pprof Profiling”Enable pprof
Section titled “Enable pprof”geth --pprof --pprof.addr 0.0.0.0 --pprof.port 6061Access
Section titled “Access”# View profilescurl http://localhost:6061/debug/pprof/
# CPU profilego tool pprof http://localhost:6061/debug/pprof/profile49.2 Debug API
Section titled “49.2 Debug API”Enable Debug API
Section titled “Enable Debug API”geth --http --http.api eth,net,web3,debugCommon Debug Calls
Section titled “Common Debug Calls”# Get block with more infocurl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"debug_getBlockRlp","params":["0x0"],"id":1}'49.3 Trace Transactions
Section titled “49.3 Trace Transactions”Enable Tracing
Section titled “Enable Tracing”# Start node with tracinggeth --http --http.api eth,net,web3,debug,traceTrace Call
Section titled “Trace Call”curl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"trace_block","params":["0x0"],"id":1}'49.4 System Tools
Section titled “49.4 System Tools”# Check CPUtophtop
# Check Memoryfree -h
# Check Disk I/Oiostat -x 1
# Check Networknetstat -iSummary
Section titled “Summary”- Use pprof for performance analysis
- Debug API for detailed block info
- Trace for transaction analysis
Last Updated: 2026-02-20