# Script for collecting and displaying trace/debug info

**URL:** <https://community.homey.app/t/script-for-collecting-and-displaying-trace-debug-info/73243>\
**Category:** Questions & Help\
**Created:** [December 7, 2022, 4:52pm UTC](https://community.homey.app/t/script-for-collecting-and-displaying-trace-debug-info/73243 "2022-12-07T16:52:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [December 7, 2022, 10:08pm UTC](https://community.homey.app/t/script-for-collecting-and-displaying-trace-debug-info/73243/4 "2022-12-07T22:08:30Z")

</div>

Maybe this is what you look for?

> [@Setting Logic Variable by HomeyScript](https://community.homey.app/t/setting-logic-variable-by-homeyscript/14819/41):
>
> I’m not good at javascript, but I bashed and bashed at the keyboard until I could use the name of the variable for the whole operation, not manually find the id first. So it’s not beautiful, but works: //Set or get variable in Homey by name of variable const varName = 'myVariable' //The name of your variable let Logic = await Homey.logic.getVariables(); let idArr = Object.entries(Logic); let filtered = idArr.filter(([key, value]) =\> value.name==varName); let [[,{ id: varID}]] = filtered; /…

---

_[View the full topic](https://community.homey.app/t/script-for-collecting-and-displaying-trace-debug-info/73243)._
