How to use ADB Logcat

My app isn’t working on my deviec so I have been to use ADB Logcat to find out what the problem is. I have no idea what ADB Logcat it or where to use it though. Could some please tell me.

(please don’t just send me a link to another forum) [import]uid: 116264 topic_id: 20340 reply_id: 320340[/import]

@ willjhoward, if you haven’t already figured this one out, I might be able to help. (When I was trying to figure out how to get the ADB logcat thing installed and working on my Mac, I did come across this post, but since there was no reply, I had to look elsewhere.)

ADB logcat (and other ADB tools) come as part of the Android SDK. If you haven’t installed Android SDK, you need to fetch it from here: http://developer.android.com/sdk/installing.html

Follow the installation instruction, and install Android SDK Tools plus Android SDK Platform-tools (by selecting it from the Android SDK Manager.) I believe you don’t need to install any of the Android APIs (because Corona build process takes care of it.)

And then, once installed, hook your Android device to your dev machine. I use Mac, so I launch Terminal.app next, then change the directory to where I have platform-tools, which looks something like this on mine:

cd desktop/androidsdk/platform-tools

After that, all I have to do is type this to start the ADB Logcat: ./adb logcat

If you use Windows, the command you use will be slightly different (i.e., you don’t need ./ part), but you should be able to follow the instructions found on Android developer site to get to the ADB logcat without too much trouble.

I hope this helps.

Naomi
[import]uid: 67217 topic_id: 20340 reply_id: 100627[/import]

Naomi is right, yet there was “Waiting for device” at prompt when i did adb logcat

(I got Nexus tab today ) so I had to go to Settings -> About Tablet -> (tap 7 or 8 times) on Build Number.

Then ’ Developer Options’ showed up above ‘About Tablet’.

Next in Developer Options, after enabling USB Debugging I was able to get the logs

oh and adb logcat Corona:v *:s

is pretty useful.

Thanks to Rob’s comment here

There is a tutorial/blog post that covers this:

http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

for future reference.

Rob

For those who prefers GUI to command line, there is an alternative approach.

  1. Install ADT, if you don’t have it (http://developer.android.com/sdk/index.html).

  2. Run it and switch to DDMS perspective.

  3. Find your device in the list of devices (it should be connected to the computer with a USB cable) and select it.

  4. In the Logcat view, you’ll see all the device’s logging.

  5. To only see logging from your Corona app, create a filter with tag “Corona”. 

Naomi is right, yet there was “Waiting for device” at prompt when i did adb logcat

(I got Nexus tab today ) so I had to go to Settings -> About Tablet -> (tap 7 or 8 times) on Build Number.

Then ’ Developer Options’ showed up above ‘About Tablet’.

Next in Developer Options, after enabling USB Debugging I was able to get the logs

oh and adb logcat Corona:v *:s

is pretty useful.

Thanks to Rob’s comment here

There is a tutorial/blog post that covers this:

http://www.coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

for future reference.

Rob

For those who prefers GUI to command line, there is an alternative approach.

  1. Install ADT, if you don’t have it (http://developer.android.com/sdk/index.html).

  2. Run it and switch to DDMS perspective.

  3. Find your device in the list of devices (it should be connected to the computer with a USB cable) and select it.

  4. In the Logcat view, you’ll see all the device’s logging.

  5. To only see logging from your Corona app, create a filter with tag “Corona”.