# How create debugging code?

**URL:** <https://community.thunkable.com/t/how-create-debugging-code/1715796>\
**Category:** Questions about Thunkable X\
**Tags:** sound\
**Created:** [February 4, 2022, 2:22pm UTC](https://community.thunkable.com/t/how-create-debugging-code/1715796 "2022-02-04T14:22:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukasz.jatakijot](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@lukasz.jatakijot](https://community.thunkable.com/u/lukasz.jatakijot)\
**Post date:** [February 4, 2022, 2:22pm UTC](https://community.thunkable.com/t/how-create-debugging-code/1715796/1 "2022-02-04T14:22:10Z")

</div>

Hi!

I have problem with playing sound [shorts MP3 file] in my app. After few play [10-20 times] smething goes wrong and sample are not play after next button touch.

So I looking for some “debugging” function witch can help me localize where exist an error - could someone help me with that?

I attache screen of my button blocks.

Regards!

[Zrzut ekranu 2022-02-04 151934|298x251](https://community.thunkable.com/uploads/short-url/pTgL1CnIcJxsxulSOWoS6FjISyO.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 4, 2022, 3:36pm UTC](https://community.thunkable.com/t/how-create-debugging-code/1715796/2 "2022-02-04T15:36:45Z")

</div>

The link you shared doesn’t work.

But here’s a method I use for debugging:

> [@Debugging in Thunkable X (Video)](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471):
>
> I thought I’d share a process I use for debugging my projects. It involves creating a function that can be used over and over throughout the code blocks in order to help determine where things are going wrong, whether or not certain blocks are ever triggering, and what the values of several variables are. Here’s a screenshot of what I’ve set up: The real power comes from being able to quickly change the delay (and even set it to 0 seconds) or just remo…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [May 5, 2022, 3:36pm UTC](https://community.thunkable.com/t/how-create-debugging-code/1715796/3 "2022-05-05T15:36:47Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
