Does anyone have any tips how I can "debug" my app?

Sometimes when I am about to keep my coding after a day or so, I meet with a crashing app, even though I haven’t done anything. As today, that happened, and even my backup for that project is crashing. (I wouldn’t have done any backup if the app was crashing, so it once have been all good).

Now I am trying to see what it can be, so I have removed everything (out from the blocks, the code are still there but greyed out at the side of the blocks (when screen starts etc)), But still the app is crashing.
Wouldn’t that be a safe way to debug ?? …end then just drag the parts back until it crashes again…

How are you doing to “debug” your apps?

1 Like

ok, an update… It looks like it was the “live test” function that was f**ed up…
I got it working again by, as I said, drag all codes out from the blocks and back again.

But still, how do you do??

1 Like

This is how I do it:

There are some common things that can cause an app to crash such as using the wrong property when calling an API, or assigning an incorrect type to a variable (such as making a variable text and then assigning a list to it), or referencing a list item that doesn’t exist (item #5 of a list with 3 items).

1 Like

Hi. Thanks! This is really helpful! I will try to implement this in my project somehow!

1 Like

Hi all,

again… How do you guys debug your apps?
@Tatiang, your way is awesome. I have used it some times now, and also simply displayed my different steps in labels just to make sure averything I expect to be in my variables etc actually are there.

I am trying to build carefully, step by step, view the results in labels as I said, but then the app is crashing, and that’s fine, its my bad coding. So I step back to how it was before I added this code block that Made it crash, but it still crashes, then I go back even further, but it still crashes…

And quite often I simply run-force quit-run-force quit a couple of times and then it works again, without having done anything in the code. I am guessing that if I have run the app earlier the code should be ok? So, when it crashes it’s caused by something I recently added in the code…?
So, by go back the app Should be working again, as it previously did, right?

Is this a common behaviour for Thunkable? Is this something you experienced guys are meeting sometimes as well? If so, how do you do to come back and keep coding?

Tatiangs recommandation is great, but it requires that the app is starting :blush:

I am running:
Mac OS Mojave (and sometime Catalina)
Safari 12.1.2 (at least for Mojave, I am not sure which version on Catalina right now)
iPhone XR
IOS 14.4.2
Thunkable test app 267-2

I often clear cache for Safari on my Mac.
quite often I force quit the app on my phone as well.
Sometimes it works, sometimes not…

Thanks all!

1 Like