Custom debug.xml

Is there any way to create a custom debug error screen or somehow prevent showing a user all the details of the error and a big scary warning saying “critical error occurred”? Why would anybody make anything that would show a user that stuff but not provide a way to print it to a database or otherwise handle the error message with logic?

Hmm :thinking: You mean you’re getting the “critical error occurred” screen in a standalone version and not just in the preview app?

Yes, if there is a bug which causes app to crash even in build version it gives that same screen. Hoping to get all bugs fixed but even so just in case it would be better to be able to customize the error screen. I know in android studio it is a common practice to make a nice pleasant screen rather than a :no_entry_sign::fu::japanese_goblin: CRITICAL ERROR THiS APP IS UNSTABLE​:no_entry_sign::japanese_goblin: message. And never show the user the error code. Instead send it to database behind the scene so that it can be viewed by developer only.

In android the only requirement is that the screen be named debug.xml and it will automatically go to that screen and pass the error code as extra key. This should be easy enough to implement.

Ah, I see. That would indeed be a nice feature to have, although of course the preferable situation is that there are no crashes. Since you were saying you had trouble creating feature request tickets in the other thread, I created a ticket for you here: Allow customization of error screen | Feature Requests | AppGyver

As for general debugging solutions, we can’t add a catch all errors clause, but I recommend our debugger, and as a general practice I use “debug log” a lot in my logic so I can see what parts of logic execute and I usually include any relevant parameters as well in them.

Oh so we can access the debug log? Even on the build? That would be a step closer. :blue_heart:. And yes ideally we must create an app that will not crash, but just in case it does we need to learn the error and create a smoother experience for beta testers that will not scare them.

1 Like

I’m not certain debug log also appears on build but I hope it does - using toast to debug a whole application gets very cumbersome :sweat_smile: