# Debugging script code

**URL:** <https://community.homey.app/t/debugging-script-code/105302>\
**Category:** Flows\
**Tags:** flow\
**Created:** [March 1, 2024, 7:40pm UTC](https://community.homey.app/t/debugging-script-code/105302 "2024-03-01T19:40:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheKos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thekos/32/33969_2.png) [@TheKos](https://community.homey.app/u/TheKos)\
**Post date:** [March 1, 2024, 7:40pm UTC](https://community.homey.app/t/debugging-script-code/105302/1 "2024-03-01T19:40:10Z")

</div>

Dear readers,  
I am having some trouble with a homey script, looking for a way to debug the code. Is it possible to debug the code by executing it one line at a time and see the parameters. And set break point etc ?  
(The f8 similarity in VB, when writing macro’s).  
May not be the most professional way, but for me this works.  
I also have VScode installed on my laptop, so if that’s a way to do it, would also be fine.

So any suggestions welcome.

---

<div class="post-metadata">

**Author:** ![Andy\_Henderson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andy_henderson/32/80642_2.png) [@Andy\_Henderson](https://community.homey.app/u/Andy_Henderson)\
**Post date:** [March 1, 2024, 8:36pm UTC](https://community.homey.app/t/debugging-script-code/105302/2 "2024-03-01T20:36:50Z")

</div>

Unless someone says otherwise, I don’t think the HomeyScript tools are that sophisticated.

What I do is add

`Log( 'a message string that can include variables' );`

at key places. The string appears in the ‘Console’ window when you run the script in the ‘HomeyScript’ page.

Crude, but effective.

Andy

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [March 1, 2024, 10:59pm UTC](https://community.homey.app/t/debugging-script-code/105302/3 "2024-03-01T22:59:08Z")

</div>

I think the script in this post shows nice examples:

> [@\[Homey Pro\] overview script](https://community.homey.app/t/homey-pro-overview-script/77459):
>
> Homey Pro overview script Always wanted an overview of your current Homey? Because you are in the process of migrating to another Homey Pro, or just for the fun of it. Well that is what this very HomeyScript script is for. Feel free to share your results in this thread, as I do like to see every ones Homey too! (no sensitive data is shown) I’ve tried to make this overview script somewhat user friendly to use. The only thing you need is an Homey Pro (any version, besides Homey (Cloud)) and t…

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [March 3, 2024, 6:23pm UTC](https://community.homey.app/t/debugging-script-code/105302/4 "2024-03-03T18:23:00Z")

</div>

> [@Andy\_Henderson](#):
>
> I don’t think the HomeyScript tools are

You can log variables combined with text like:` log("WeekDay =", weekday);`
