Debugging the App in Android phone

You must Login before you can answer or comment on any questions.

How can I debug and get to know the console logs in my Android phone?

3 Answers

A much better sollution (rather than logcat from console) is to find the path_to_android_sdk\tools\ddms.bat (Dalvik Debug Monitor).

You can do lots of cool stuff from there, view a live log on what goes on in either the emulator or on a real device via usb, you can make fake calls to the emulator/device, you can send text-messages to it, take screenshots, and loads of other things. It baffles me that no one in here promote it better for Android-debugging.

It also (in my experience) pick up more errors than the Titanium trace-log, it has saved my ass on numerous times when trying to figure out an error (while trace has shown none).

leave the phone connected to your computer, open a terminal and run:

path_to_android_sdk/tools/adb -d logcat
you need to have usb debugging enabled on the phone

— answered 3 years ago by Dan Tamas
answer permalink
3 Comments
  • where can i view the log

    — commented 3 years ago by Radhakrishnan Selvaraj

  • adb is a "live" console for debug messages, so in the terminal you'll exactly what is going on while the app runs. In other words open adb as described above then start your app on the device and play with it.

    — commented 3 years ago by Dan Tamas

  • if you want to output the console to a file do the following

    path_to_android_sdk/tools/adb -d logcat > ~/android.log
    this will create android.log file in your home directory (OSX/Linux)

    — commented 2 years ago by Jon Mears

I have same erros, its details

File "C:\Users\o\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\androidsdk.py", line 131, in find_platform_dir raise Exception("No \"%s\" or \"%s\" in the Android SDK" % ('android-%s' % api_level, android_api_levels[api_level])) Exception: No "android-8" or "android-2.2" in the Android SDK

Your Answer

Think you can help? Login to answer this question!