Finding Stack Trace in Eclipse with Android

自闭症网瘾萝莉.ら 提交于 2019-12-19 07:43:32

问题


Not used to using Eclipse for java, mainly used jEdit but with the Android dev along comes Eclipse. I've switched to the debug window and pressed the debug button which starts my app, It crashes however I can't find the stack trace. I can see in the 'Debug' pane that it has crashed with a '' exception however I can't see any more information. Not sure if you can get it but I'm a little used to Visual Studio with line numbers and a bit more information saying what went wrong. As I said all I'm getting is -

 'Thread [<1> main](Suspended (exception RuntimeException))'

in the debug window. Can anyone shed some light as to where I can find more information?


回答1:


For normal Java development in Eclipse, stack traces will appear in console view:

Window -> Show view -> Console

(if it isn't listed, click on "Other" and find "Console").

When dealing with Android development, find the "LogCat" view, like I described above. The stack trace should be there.




回答2:


Check out the DDMS perspective and LogCat view. Android logs everything, what can be viewed with LogCat.




回答3:


You should read this guide: Debugging Android using Eclipse and ADT




回答4:


You can directly type the adb logcat at the command prompt, it will display the stack traces.

For more info, refer this page: http://developer.android.com/guide/developing/tools/adb.html#logcat



来源:https://stackoverflow.com/questions/4957730/finding-stack-trace-in-eclipse-with-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!