Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logcat tab in Eclipse DDMS Persepctive (Android ADT plugin) Keeps Coming up Blank

I have seen this problem off and on while running the Eclipse (Galileo) under Fedora 11-13, whether the target is my device or an emulator. But now with my new device, the HTC T-Mobile G2 (Android 2.2), I see it much more frequently: I successfully download the app (complete with lots of Log.d() calls), the system successfully launches it, but the LogCat pane in the DDMS perspective is completely blank.

Sometimes, only sometimes, I seem to be able to kick it into action by clicking on the tool for Debug (the little bug one). But that doesn't even work all the time. Worse yet, it forces me to restart the whole program, which is very cumbersome.

And yes, I did remember to connect the device and make sure the device shows up under "adb devices", AND make sure that is the device the ADT downloaded to. I can even hit breakpoints in the code.

I suppose I could try relying only on the debugger, but I put a lot of work into writing those Log.d statements in the right place, it would be a giant leap backwards to do without them now. So any suggestions concerning what the problem might be, workarounds, or how to find relevant bugs logged against either ADT, SDK or the G2, would be welcome.

TIA

PS: Google searches such as "android ddms logcat" have not helped so far.

PS: I have also considered running ddms from the commandline, but the instructions on how to do this wtihout conflicting with the port already chosen by ADT for running DDMS are not clear enough to inspire confidence: so I always quit Eclipse before running the command line version of ddms. But then I lose the handy ability (provided by Eclipse) of navigating my source code while reading the log, so this too, is an inferior solution. Perhaps if someone can connect a few more of the dots in Google's instructions on this by explaining how to get the device and command-line DDMS to agree on a port while still running Eclipse, that would be a good solution.

like image 903
Matt J. Avatar asked Jan 21 '23 04:01

Matt J.


1 Answers

Just to suggest the basics, when you click on the DDMS tab, is the device listed on the devices tab? (If devices isn't there, click Window->Show View->Devices) If it is listed, have you clicked on the device (on the name column). Sometimes if the device isn't clicked on it will not show the logcat.

If it is and you have selected the device - try clearing the log (the icon of a page with a red cross at the bottom right corener of it - located at the top right of the logcat panel) I find if I have had it running for a long time it sometimes fills up and stops displaying the log, although normally one line is shown.

like image 181
Scoobler Avatar answered Jan 23 '23 17:01

Scoobler