debugging android

hi , I’m building a program on android , I’m new to unity and I’m trying just to debug and show some simple messages on the console . I have written Debug.Log(“hello world”); on my update function and attached it to my object . I don’t see any errors and think it should show the message but it doesn’t work . I have checked the “development build” and “script debugging” on the build window, and I’m testing my program on my android device . any suggestions on how to make it work?

thanks

Use logcat profiler. Enable it under the player settings.
Logcat is a part of adb.exe under the Android SDK \platform-tools folder.

To run it you can use the following commands…

adb logcat
(begins logging)

adb logcat -c
(clears the log)

adb logcat > yourlog.txt
(dumps the log to a textfile called yourlog.txt)

EDIT : Remove the http:// Unity answers puts it there for some reason :confused:

adb logcat -help
(help on all the command line options)

So before you start building your game, run adb logcat, you will see text being outputted to the command line window. Once you are all done, you can dump it to a file to read.

EDIT : An even better way to debug is using Eclipse. It’s an IDE for Android, and gives you a grid-like GUI to view and filter your Android device logs.
Read more about it at ADT Plugin (UNSUPPORTED)  |  Android Studio  |  Android Developers
It is far superior to logcat and well worth installing.

Hi, you can use the KGFDebug System to display your logs at runtime in a structured way on android and ios devices.

Checkout the screenshots and webdemo here:
KGFDebug

You can buy it in the assetstore.

Eclipse is now “eclipsed” by obsolesence, replaced by Android Studio.
The Android Studio feature “logcat monitor” via adb works very well.
Android Studio is a 1.9Gb download, (not including Android SDK/AVD/tools)
but given the filtering options (filter by “unity”), it is a vast improvement on attempting a regex on adb logcat commandline output, and does not require you to have only one adb device connected or to disconnect the usb cable when you have done an adb tcpip 5555 adb connect xx.xx.xx.xx for Android unity debugging.