# Best practice for contract debugging?

**URL:** <https://forum.flow.com/t/best-practice-for-contract-debugging/1978>\
**Category:** 🛠 Developer Tools\
**Created:** [May 25, 2021, 2:45pm UTC](https://forum.flow.com/t/best-practice-for-contract-debugging/1978 "2021-05-25T14:45:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexZ](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@AlexZ](https://forum.flow.com/u/AlexZ)\
**Post date:** [May 25, 2021, 2:45pm UTC](https://forum.flow.com/t/best-practice-for-contract-debugging/1978/1 "2021-05-25T14:45:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [May 28, 2021, 4:05pm UTC](https://forum.flow.com/t/best-practice-for-contract-debugging/1978/2 "2021-05-28T16:05:41Z")

</div>

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](https://github.com/onflow/flow-js-testing)

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](https://github.com/onflow/flow-core-contracts/tree/master/lib/go)
