It is possible to retrieve debug logs, warnings, and errors from the device while the game is running. This comes in very handy in debugging, especially if you have unwanted behavior recurrent on the device and not in the editor's play mode.
We can retrieve these logs through the console, using logcat
, which is a combined message pipe for all Android applications, as follows:
Connect your device to the computer with USB debugging enabled.
Launch the game on your device.
Hit the Windows key + R to open the Execute window (or launch the Terminal on Mac and move directly to step 3).
Type
cmd
in the new window and hit Enter or click on the Ok button.In the newly opened command window, type
cd
followed by your Android SDK'splatform-tools
folder location and hit Enter. For example, in my case it is:cd C:\SDK\platform-tools