Overview of debugging
Debugging is an important exercise when authoring Solidity smart contracts. Debugging refers to finding issues, bugs, and removing them by changing code. It is very difficult to debug a smart contract if there is inadequate support from tools and utilities. Generally, debugging involves executing each line of code step by step, finding the current state of temporary, local, and global variables, and walking through each instruction while executing contracts.
We can debug Solidity contracts using the following methods:
- Using the Remix editor
- Raising and consuming events
- Using a block explorer
Let's briefly find out more about each one.