How to know reason why the game crashed on Android device?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wbgyor

I am using Admob plugin to serve ads and after viewing a rewarded video the app crashes
sometimes. As Admob module wont work on running in the editor. How can I get the details of the crash or the error which lead to the crash. Can I run the app on an android device and get the console output in the editor?. How can the error which lead to crash can be found out?

:bust_in_silhouette: Reply From: cima2u-net

You can check this post by google. I think it would be helpful

:bust_in_silhouette: Reply From: Akien

Adding to cima2u-net, you should use adb logcat to retrieve the logs from the Android session, which should include detail about the Godot game.

There will be a lot of content in the logcat output, but you can search for godot and for your application identifier to find relevant logs. You can use adb logcat from the command line or (I believe) through Android Studio.

Make sure to export a “Debug” build to have relevant information. You can also enable “Debug > Settings > Verbose Stdout” in the Project Settings to have more information printed by the Godot process while it runs.

If there’s an actual crash (e.g. a segmentation fault, with a backtrace involving Godot code), you can build your own debug template for Godot to have all debug symbols (the official debug templates use the release_debug target which has debug information but some symbols are stripped). See Compiling for Android.