Truffle provides a rich debugging interface, which allows you to debug the transactions against your contract. This is very similar to existing command-line debuggers for other development environments. The following features are supported by the Truffle debugger:
- Code stepping: Over, into, out, next, instruction, and so on
- Variable inspection: Stack, memory, and storage
- Breakpoints
- Watch expressions
- Custom expression evaluation
- Current code location, including the address of the running contract
Unlike other tools and methods, while debugging an Ethereum transaction, you are not running the code in real time. While debugging a contract, you are stepping through the historical execution of a transaction. In this recipe, you will learn how to debug a transaction using Truffle's debugging tool.