I hope to debug step by step in Test Environment, so I can know which step causes an error in a certain transaction (function call). Is there a way to do it?
Hello @Ankarrr, unluckily there is no good CLI step by step debugger yet. There are three alternatives to tackle this today, none of them compatible with OpenZeppelin Test Environment:
- There’s Buidler’s
console.logby Nomic Labs
- You can use Tenderly to deploy and debug your contract on a local network
- And finally, you can copy-paste your contracts and debug it using Remix which is the only step-by-step debugger
I hope this helps!
Thanks for your reply. May I have a sample of how to use the Buidler’s
console.log by Nomic Labs with Test Environment?
@Ankarrr Sorry for the confusion, it’s not possible to make use of
console.log in Test Environment because it relies on specific features of the Buidler EVM.
Sorry about the confusion, I got it wrong. I updated the answer accordingly.
Thank you for your responses! I think we need a better solution to debug a transaction in the test environment.