有没有办法让拷贝和pastable调试输出在Android SDK模拟器? [英] Is there a way to get copy-and-pastable debug output in the Android SDK Emulator?

查看:182
本文介绍了有没有办法让拷贝和pastable调试输出在Android SDK模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android模拟器生成的一些信息,我可以看到把它弄出来的唯一方法是使用Log类。

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.

不过,您不能复制和粘贴在DDMS日志窗口。这实在是烦人,因为我不能使用这些信息在其他应用程序,例如,无需重新键入它。

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?

谢谢!

推荐答案

使用DDMS logcat的窗口中,您可以选择线条和复制和粘贴文本到其他窗口。

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

如果你使用java.util.logging中的日志类,而不是你可以附加一个处理程序写入日志文件出到一个文本文件,如果这将使事情变得更容易。 LogCat中仍然可以使用java.util.logging中,但默认信息时及以上才有效。

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.

这篇关于有没有办法让拷贝和pastable调试输出在Android SDK模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆