I just tried my app on Android and it suddenly doesn't work well (on Windows it works fine). Is there a way to see unity console's errors and Debug.Log
messages- when I run the device on Android?(I use development mode and script Debugging).
I connected adb to the device, and can also use logcat and filter to "unity", but it still shows a crazy log.
All I want to see is a clean log that shows errors and my Debug.Log
messages which I usually can see easy and clear on the Unity Console on Unity on Windows.
Android allows collecting system logs using Logcat. Log messages can be viewed in a Logcat window in Android Studio, or you can use the command line tool to pull them. Several Android apps are also available in the Google Play store that allow easy access to these tools.
Open your file manager and navigate to the Android device. Browse to "<Android-device>\Internal storage\logback" directory.
View Logs on Android:
To see Debug.Log
messages, download Android Studio.
Go to the Android Monitor Tab in the Android Studio then select your device from there.
See the image below:
If you have problems of the logs from the device not showing, restart adb.exe. from the command-line.
Stop it:
adb kill-server
Then start it again:
adb start-server
All I want to see is a clean log that shows errors and my Debug.Log messages which I usually can see easy and clear on the Unity Console on Unity on Windows.
1.First filter it with the Unity tag.
2.Disable Development mode from Unity Build Settings. With that on, you will receive extra logs you don't even need.
View Logs on Android without Android Studio:
You can view log from without Android Studio by using the Log Viewer plugin which is free. It will let you see the log on the device itself.
Print Logs from Android Java Plugin:
If you are trying to create log from Java plugin, instead of using the Debug.Log
function, use one of the Log
functions from Java side.
For example, Log.v
, Log.i
, and Log.e
.
Print Logs from Android C++ Plugin:
If using a C++ plugin, see this plugin from my other question which let's you print log from a C++ plugin with Debug::Log
.
With the new release of Unity 2019.1 you can download from the package manager the Android Logcat that allows you to display information inside the Unity editor.
Inside the Unity editor go to Window > Package Manager > Download and install the Android Logcat package.
For more information on a how to use guide you can visit this manual : https://docs.unity3d.com/Packages/[email protected]/manual/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With