# Debugging in Thunkable X (Video)

**URL:** <https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471>\
**Category:** Tutorials and DIY Guides\
**Tags:** community, tips, debug\
**Created:** [September 25, 2020, 6:25pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471 "2020-09-25T18:25:50Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 16, 2022, 4:54pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/22 "2022-12-16T16:54:15Z")

</div>

Hi @tatiang, I thought I was calling the " **getUser** function while using the **Debug** function. I am confused now.

How do I call the **getUser** function?

Andos.

---

<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:** [December 16, 2022, 5:28pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/23 "2022-12-16T17:28:02Z")

</div>

When I say “call” a function in Thunkable, it just means that you have the blue block `getUser` that runs the blocks defined by that function elsewhere. The contents of the function don’t _do anything_ until it’s called.

I think this explains it pretty well and maybe the video would be helpful, too: [Functions - Thunkable Docs](https://docs.thunkable.com/functions)

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 16, 2022, 6:58pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/24 "2022-12-16T18:58:17Z")

</div>

Hi @tatiang, understand “ **calling** ” now but that still doesn’t explain why the **Debug** function is not working.

Can you think of any other reasons why my **Login** screen has suddenly stopped working?

Andos.

---

<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:** [December 16, 2022, 7:07pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/25 "2022-12-16T19:07:42Z")

</div>

My suggestion was to call the **getUser** function and see what the results of all of these Run\_Debug blocks below are. Did you do that? Are you saying that **none** of them show up? If so, how have you confirmed that the getUser function ran at all?

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/c/6c6eedc7d9844a8441c418b8af1079f4523797bb.png)

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 16, 2022, 7:32pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/26 "2022-12-16T19:32:15Z")

</div>

I did run them as you suggested and it just counted 1 thru 5. That was all. See video below:

[![](https://img.youtube.com/vi/kaTXrEjlFbA/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=kaTXrEjlFbA)

Andos.

---

<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:** [December 16, 2022, 7:58pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/27 "2022-12-16T19:58:37Z")

</div>

You’re either not calling the **getUser** function or you are and your other debugging functions are getting in the way of seeing the results. Can you share an updated project link?

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 17, 2022, 12:59am UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/28 "2022-12-17T00:59:33Z")

</div>

Hi @tatiang, as requested, here is the latest link to my **Login** blocks:

[https://x.thunkable.com/copy/7c895b189355c9c36fd8761f1e9f3f83](https://x.thunkable.com/copy/7c895b189355c9c36fd8761f1e9f3f83)

Andos.

---

<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:** [December 17, 2022, 1:37am UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/29 "2022-12-17T01:37:50Z")

</div>

Is it possible for you to private message me with an email address and password I can use to sign in? If not, I’ll see if I can work around that but it would be quicker to use a valid combination.

And can you try signing in on the first screen in this modified project: [Thunkable](https://x.thunkable.com/copy/3519a3132b77f0e3e55b7dd22a09dada)

I added a function called **getUser DEBUG** and I think that might help here.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/4/e479ebeff8bb8e0e25a072ed6aeb197019cfd876.png)

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 17, 2022, 3:06pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/30 "2022-12-17T15:06:55Z")

</div>

Hi @tatiang, how do I “private message” ?

Andos.

---

<div class="post-metadata">

**Author:** ![shrey](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/shrey/32/105637_2.png) [@shrey](https://community.thunkable.com/u/shrey)\
**Post date:** [December 17, 2022, 3:14pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/31 "2022-12-17T15:14:28Z")

</div>

To do that, you tap on the person’s profile picture, then you press the message button.

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 17, 2022, 3:19pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/32 "2022-12-17T15:19:53Z")

</div>

Thx 👍

Andos.

---

<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:** [December 17, 2022, 4:48pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/33 "2022-12-17T16:48:58Z")

</div>

It turns out I can’t run it without your Firebase API key, etc. So you’ll have to do the debugging on your end.

When I don’t know why something isn’t working, I just keep adding more and more debugging function calls like this to help me narrow down where the problem is:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/7/67ef0c9b1e77ca2e6731c7751f9cb185f325b74a.png)

Also, I wasn’t seeing the error displayed in the Status Label so I added the Run\_Debug and it showed me the error (missing API key).

Anyway, hopefully you can get some idea of where the problem is by adding more debugging function calls. I would want to know if you see the debugging text in this order:

Signing in…  
Error: _or_ Not verified. _or_ Verified. - _only one of these will show up_  
Calling getUser…  
Start getUser  
num rows  
index  
username:  
End getUser

**Which of those appear/don’t appear?**

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 19, 2022, 1:54pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/34 "2022-12-19T13:54:50Z")

</div>

Hi @tatiang, I have inserted **Debug** blocks you have shown above and have left the **Debug** blocks in situ within the **getUser** function. I was not sure whether to remove them or not. See below:

 ![LoginClick Debug Blocks & getUser Debug-Screenshot 2022-12-19 13.12.09](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/5/558d8fa0fd994aead339e4182d1a22f33f236fce.png)

I then ran the **Debug** operation. See video below:

[![](https://img.youtube.com/vi/oMlALlhIzIM/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=oMlALlhIzIM)

As you can see, I got the same counting result.

So I removed the **Debug** blocks from the **getUser** function as below:

 ![getUser block without Debug Blocks-Screenshot 2022-12-19 13.34.08](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b1dedc91927b10d33f96db048f2cc64db6317aee.png)

And I still received the same result. See video below:

[![](https://img.youtube.com/vi/Giw7SVTmMgk/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=Giw7SVTmMgk)

I can’t help wondering…could this debug issue have something to do with the way the **Debug** blocks are set up for this particular type of purpose? See blocks below:

 ![Debug blocks and Debug function-Screenshot 2022-12-19 13.43.55](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/c/3c21854311733097b1da4662f9be48424b909817.png)

What I mean is, is there another way to set the blocks up so that they display what results they find?

Also, I was wondering could problem be because I added a “j” variable?

 ![Debug j blocks problem-Screenshot 2022-12-19 13.49.53](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/c/acbccd4e6ba67e05a7549f6f2493e49c227de6b5.png)

I have just noticed that the “j” variable isn’t actually associated to anything outside of the **Debug** blocks.

Andos.

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 19, 2022, 2:24pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/35 "2022-12-19T14:24:58Z")

</div>

Hi @tatiang,  
in the **Run Debug** function I tried replacing the **User\_Values\_Text** ’s **Report** variable with the **list of Values in AvLogUserEmailinSheet1/ Username** block from the **getUser and return** function block (below)

 ![RunDebugfunctionwithUsernameList-Screenshot 2022-12-19 14.07.34](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d5e25b6ecef051e82930c0507b73b59188859dcd.png)

and received the results in the video below. I don’t know whether this was the correct approach so I am asking you for thoughts about this.

[![](https://img.youtube.com/vi/7Cbq1HQnLZM/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=7Cbq1HQnLZM)

Andos.

---

<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:** [December 19, 2022, 6:44pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/36 "2022-12-19T18:44:10Z")

</div>

No, the `report` variable needs to be used in the Run\_Debug function. That function should look like this:

**set Debug Status Label’s Text to [report]**  
**wait 2.5 seconds**

Please stop clicking the Debug button. It doesn’t do anything helpful. It just shows 1, 2, 3, 4, 5 because that’s how you’ve programmed it.

You need to focus on these:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/53676d775f9371f100c1a300ca7141118221025b.jpeg)

When you sign in by clicking the LoginButton, you should immediately see either “Error: [error]” or “Not Verified” or “Verified.” **Which one do you see?**

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 19, 2022, 7:23pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/37 "2022-12-19T19:23:08Z")

</div>

Hi @tatiang, here are how my blocks are currently standing. With no **Debug** blocks in the **getUser** function. Do you wish for me to put them back in?

 ![Blocks for LoginButton-Screenshot 2022-12-19 19.04.29](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6de853be7456fda8b4d3e8a886ed18217052094a.png)

When I click on the **Login** button the results are shown in the video below:

[![](https://img.youtube.com/vi/AtakFqQeam0/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=AtakFqQeam0)

I tried putting in 0.5 sec Control blocks into the **Login** blocks but still couldn’t see any “Error” messages.

So, as you had suggested, I changed the **Debug Status Label’s Text to [report]** timing to **Wait 2.5 secs**

Here is video of the results:

[![](https://img.youtube.com/vi/MtwNibF5ZA4/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=MtwNibF5ZA4)

Also, does this screenshot of the error message help at all?

 ![LoginErrorMsg-Screenshot 2022-12-19 19.26.01](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d77ae50c8169cf14978cefaca7bb2fa2149b13c6.png)

Andos.

---

<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:** [December 19, 2022, 8:06pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/38 "2022-12-19T20:06:48Z")

</div>

Yes, put the debug function calls back in the getUser function. You actually made some progress because in the videos it shows “Signing In” and “Finished Signing In”. So we know it’s gotten to those parts of the When LoginButton Click event. Now we just have to figure out why the getUser function isn’t working right. Or more importantly, I guess… why are you not seeing “Verified”. I think maybe the getUser function isn’t a problem at all because we can’t even get there. As I said, you should be seeing **Error:** or **Not verified** or **Verified** appear in the debug label.

But you’re also displaying all of this:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a0fd848992d27999b8a20e23074ae5e454f7645.jpeg)

Which I don’t understand where that’s coming from. Maybe you added a debug call with a variable/list instead of a text string?

**After you add the debug calls back into getUser, please share a link to the updated project.**

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 19, 2022, 8:41pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/39 "2022-12-19T20:41:40Z")

</div>

Hi @tatiang, I have returned the **Debug** blocks back into the **getUser** function (See below)

 ![Debug Blocks back in getUser-Screenshot 2022-12-19 20.29.41](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/2/c28753c4d1c5902c7cd3b4420e39cc31e11d7d46.png)

And this video shows the resulting outcome:

[![](https://img.youtube.com/vi/To_NxsT-Tmk/hqdefault.jpg "AvLog Group Video") ](https://www.youtube.com/watch?v=To_NxsT-Tmk)

Below, I shown a screenshot of the details shown:

 ![VideoResultsLoginwith Debugblocks in getUer-Screenshot 2022-12-19 20.39.34](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/d/dddd1773fd42ad7e6e362dfe602e4e5e2d13dcf6.png)

Could these list blocks maybe have something to do with the problem?

 ![DebugClickBlocks-Screenshot 2022-12-19 20.44.02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/f/ef96853970ad609f224c51afb5cddbbf9190631a.png)

Andos.

---

<div class="post-metadata">

**Author:** ![andos-avlog](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/andos-avlog/32/122340_2.png) [@andos-avlog](https://community.thunkable.com/u/andos-avlog)\
**Post date:** [December 19, 2022, 9:10pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/40 "2022-12-19T21:10:05Z")

</div>

Hi @tatiang, I have just noticed something odd in my Firebase database in Thunkable, All the members’ info is showing as “Thunkable” in every cell. See below:

 ![CurrentFirebaseView-Screenshot 2022-12-19 20.49.17](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/7/e70aee6f135b5bd932f36a6beaad7dcd37fa4325.png)

Is this just a security thing?

All the members in the database are showing in the Firebase website shown below:

 ![ActualFBaseDatabase-Screenshot 2022-12-19 20.59.30](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/4/5425a2880c2e1e2b1e77b87a40a27a67faf1f696.png)

Is this relevant?

Andos.

---

<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:** [December 19, 2022, 9:27pm UTC](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471/41 "2022-12-19T21:27:36Z")

</div>

Yes, external data sources won’t show up if you share a project. It will just show “Thunkable” for the cells. No, that shouldn’t be a problem.

As I said, please don’t click on the Debug button any more. I would encourage you to delete **all** of the blocks in this screenshot:

 ![DebugClickBlocks-Screenshot 2022-12-19 20.44.02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/f/ef96853970ad609f224c51afb5cddbbf9190631a.png)

And the link to the updated project?

[Previous page](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471.md?page=1)

[Next page](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471.md?page=3)
