Unity3d using Logcat to debug Android

Source: Internet
Author: User

After releasing the Android package, it is difficult to know what is happening, such as the flash back and so on, can be detected with Logcat,Logcat is a command line tool in Android, can be used to get the log information of the program , you can use the Logcat command to view the contents of the system log buffer.

It is also possible to run an Android program or a real machine with the simulator to test it .

Its position is in the sdk/platform-tools.

Instruction format

[ADB] logcat [<option>] ... [<filter-spec>] ...

Option section

V-verbose (Lowest priority)
D-debug
I-info
W-warning
E-error
F-fatal
S-silent (highest priority, on which nothing is ever printed)

Option Description
-b<buffer> Load a log buffer that can be used for viewing, such as event and radio. The default value is main. See viewing alternative Log buffersspecifically.
-C Clear the Log on the screen.
-D Output the log to the screen.
-f<filename> Specifies the <filename> of the output log information, which is stdout by default.
-G Outputs the specified log buffer and exits after output.
-N <count> Set the maximum number of logs <count>., the default value is 4 and needs to be used with the-r option.
-R <kbytes> Output log per <kbytes>, default value is 16 and needs to be used with the-f option.
-S Set the default filter level to silent.
-V <format> Set the log input format, the default is brief format,
To learn more about the supported formats, see controlling Log Output format.

We can use CMD CD to this folder, in the input command adb logcat to see the log information in cmd in real time

adb logcat - S Unity only View unity information

adb logcat-d > Xxx.txt Output The previous log information to TXT

The same as adb logcat- s Unity -d > Xxx.txt to output the previous Unity log information to txt


Successfully found the problem

For more detailed information, refer to: http://www.miui.com/article-272-1.html

Xiaomi Real Machine Catch log method: Http://www.miui.com/thread-397214-1-1.html

by wolf96 2017/7/13

Unity3d using Logcat to debug Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.