views:

77

answers:

5

Hello, when I'm using the Android emulator I can do "adb logcat" to see output messages (log / system.out.println) originated from my code. It also shows the stack trace of exceptions which happen during execution.

But, when I'm using a real phone, "adb logcat" does not do / show anything.

I also tried "adb -d logcat" which also does not display anything.

Is there any way to get it working with the real phone?

Thanks.

UPDATE:

I just tried "adb -s ? logcat" ('?' is the serial number of the device) and also got no results.

I tried another "adb" command to see if anything was working: "adb -s ? bugreport". This printed a lot of stuff. Example: "Memory Info", "CPU Info" and some Java specific things. So it seams that some stuff is working.

A: 

Had the same issue but added a filter in the logcat and only give him a name and set log level to "verbose". You can try that.

I can't see the complete message of some exceptions if the message are to long. Scrolling doesn't function very well.

(Using Eclipse)

Jelmert

Jelmer
I created a named filter and set it to "verbose": still not working. Other ideas? Thanks.
MyNameIsZero
+1  A: 

you can do "adb -d logcat". This should work.

Sephy
Thanks, but it also gives no output...
MyNameIsZero
A: 

have you installed ADB drivers for the device?

What does adb devices return?

Emulators are named like emulator-5554 etc. If your device is properly installed you should see it too. The name depends on which manufacturer you are using.

If you don't see your device, the drivers are not installed correctly. Do some searches for "adb install drivers" on Google. Here's a hit that might do it for you: http://forum.xda-developers.com/showthread.php?t=502010

Key
Running "adb devices" displays the device id, as expected.
MyNameIsZero
Have you tried starting the ddms standalone application? Can you see your device in the devices list?
Key
Hello. Yes the device (real phone) appears listed when the "ddms" application is executed.
MyNameIsZero
+1  A: 

Don't forget to check Settings -> Applications -> USB debugging. Then

 $ adb -d logcat

will show log messages.

dtmilano
The USB debugging was already activated on the cellphone... no results in the logcat. Other ideas? Thanks.
MyNameIsZero