Bug fixing and debugging smart contracts

This section tells you how to go about bug fixing and debugging your code. Usually, the code will be debugged in the developer console which is similar to developing regular JavaScript code. If there is an error present in the JavaScript code, you could easily rectify it on the developer console. However, if the bug is in your smart contract, you are going to want to go a bit deeper. How are you going to debug your smart contract once it is live? Well, you cannot—not locally at least. What if somebody finds a bug? You need to find out where it came from. For these very reasons, we can use remix.ethereum.org and etherscan.io.

The modified version of the MetaCoin Solidity file found at remix.ethereum.org ...

Get Ethereum Projects for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.