# Iterating on how a macro compiles

**URL:** https://discourse.getdbt.com/t/iterating-on-how-a-macro-compiles/4825
**Category:** Archive
**Created:** [August 27, 2022, 1:47am UTC](https://discourse.getdbt.com/t/iterating-on-how-a-macro-compiles/4825 "2022-08-27T01:47:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![isreal0](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@isreal0](https://discourse.getdbt.com/u/isreal0)
#### Post date: [August 27, 2022, 1:47am UTC](https://discourse.getdbt.com/t/iterating-on-how-a-macro-compiles/4825/1 "2022-08-27T01:47:05Z")

</div>

hi there,

I found it quite time-consuming to troubleshoot a macro.  
1 I create a macro, then call it in a SQL file,  
2 then run dbt compile  
3 then check the target folder and see the result.

Is a simple way to troubleshoot a macro?  
And is there any website recommended to macro learning? Thanks.

---

<div class="post-metadata">

### Author: ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)
#### Post date: [August 29, 2022, 5:27am UTC](https://discourse.getdbt.com/t/iterating-on-how-a-macro-compiles/4825/2 "2022-08-29T05:27:24Z")

</div>

Do you have access to dbt cloud? It comes with an IDE where you can preview code compilation in the same context as you write it, without needing to go though a `dbt compile` step.
