Encode-Club-Solidity-Foundations / Lesson-01

21 stars 14 forks source link

debugging using Events? #28

Open swswsw opened 1 year ago

swswsw commented 1 year ago

What is good way to do debugging? Using events as a way of logging to do debugging?

MatheusDaros commented 1 year ago

Hello @swswsw There are some tools like Hardhat that give great debugging capabilities to smart contract development. There are some remix plugins as well, but unfortunately they don't work too well.

swswsw commented 1 year ago

Thanks for the answer. On the testnet or mainnet deployment, events will be the only way to do some kind of logging?

MatheusDaros commented 1 year ago

Events are just one of the many resources you can use to debug. Actually more important than events, you could inspect the transactions itself, the state changes and the internal calls executed.