Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get copy-and-pastable debug output in the Android SDK Emulator?

Tags:

android

sdk

I have some information generated in the Android Emulator, and the only way I can see to get it out is using the Log class.

However, you cannot copy-and-paste from the DDMS log window. This is really annoying as I cannot use the information in another application, for example, without retyping it.

Is there a better way to get debug information out of the emulator? What happens when you write more complex applications? What do you do when you need to verify it is writing correct information to URLs, databases, files etc?

Thanks!

like image 468
Jumbo Avatar asked Dec 23 '09 00:12

Jumbo


People also ask

How do I get output on my emulator?

Just change the foldername to where you have installed the SDK. Now the debugger application will start (next to the emulator), and your message will be shown with green text.

How do I view Android emulator logs?

To access it, open the Chrome Developer tools from the More tools menu. Inside it you need to open the Remote devices view from the More tools menu. The view will list all attached Android devices and running emulator instances, each with its own list of active web views.


1 Answers

Using the DDMS logcat window you can select lines and copy and paste text to other windows.

If you use java.util.logging instead of the Log class you could attach a handler to write the log file out to a text file if that would make things easier. Logcat is still available when using java.util.logging but by default INFO and above is only available.

like image 55
Nic Strong Avatar answered Nov 15 '22 17:11

Nic Strong