Proposal: App Inventor Debug Mode

Sometimes apps get really big and it makes harder to debug the problem, the runtime errors in application does not include much info.

here is a small project im working on that adds a "debug mode" to the application.

image

So whenever the mode is enabled, it makes it a little easier to debug and locate problems.
it can be enabled / disabled just like debug mode in android studio.

image

For example, in the above procedure, the "procedureAddNames" causes errors.
and it can be traced easily through the debug feature:

so in large apps, it would be very beneficial :slight_smile:,

It would print all the traces where the error has occurred (procedure names), it would be also possible to add support for events, etc :grin:

So I would like to hear your thoughts about it and how it can be better.

7 Likes

That looks great. So to see the errors you have to use adb? It is not possible to get the info in a kind of read-only terminal at the bottom of the block editor for instance? It could be a setting to hide or show that terminal.

1 Like

the traces are written to the logs, but yes we can improve it.

That is a great idea, I had a similar plan but I do not have idea about appinventor graphical interface (how it works) :sweat_smile:

1 Like

here is UI of wxbit, it has a debug panel, it can hold all the do it output, any error message.
Click the error message, will high light the block which cause this error.

4 Likes

Wow, that is a great thing, never knew about it :wink:
Maybe we can do something similar, like displaying the output directly to the do-it result.

3 Likes

vknow360 did have a LogReader extension but it seems to have disappeared.

1 Like

It is here

taken from the extensions directory App Inventor Extensions | Pura Vida Apps

Taifun

It is actually quite different, you are limited to only track normal errors, errors caused by appinventor blocks cannot be traced.

Here is a method that I use for debugging. I miss having an output console for debugging, so I sort of made one using a multiline text box and a couple console procedures. I can plug in a call to one of these procedures and see what is going on with some variable or other.

1 Like