Best practice for contract debugging?

Hi,

I’ve prepared first draft of an smart contract on Flow. Now I need to deploy and debug it (on emulator locally I guess). I tried it with Flow Playground web client first. But it does not match my requirements. It does not support to retrieve a timestamp from a recent bock being published.

Please advise what is the best practice to do this: VSCode, Flow CLI, anything else?

Also what is the common scenario how to deploy β†’ debug β†’ fix β†’ redeploy β†’ etc - any instruction would be helpful.

Thanks in advance,
Alex

I would recommend writing automated tests for it with the emulator
If you are using javascript, here is a work in progress js testing framework: GitHub - onflow/flow-js-testing: Testing framework to enable Cadence testing via a set of JavaScript methods and tools

if you are using Go, there isn’t anything super great yet, but the tools I use are in here with the SDK if you want to try them out. They aren’t well documented though, but I am working on it: flow-core-contracts/lib/go at master Β· onflow/flow-core-contracts Β· GitHub

1 Like