使用 Android 在 Eclipse 中查找堆栈跟踪
不习惯使用 Eclipse for java,主要使用 jEdit,但随着 Android 开发而来的是 Eclipse。我已切换到调试窗口并按下启动我的应用程序的调试按钮,它崩溃了,但我找不到堆栈跟踪。我可以在“调试”窗格中看到它因“异常”而崩溃,但我看不到更多信息。不确定你是否能得到它,但我有点习惯 Visual Studio 的行号和更多信息来说明出了什么问题。正如我所说,我得到的只是 -
'Thread [<1> main](Suspended (exception RuntimeException))'
在调试窗口中。谁能告诉我在哪里可以找到更多信息?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
对于 Eclipse 中的正常 Java 开发,堆栈跟踪将出现在控制台视图中:(
如果未列出,请单击“其他”并找到“控制台”)。
在处理 Android 开发时,请找到
"LogCat"
视图,就像我上面描述的那样。堆栈跟踪应该在那里。For normal Java development in Eclipse, stack traces will appear in console view:
(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.查看 DDMS 透视图和 LogCat 视图。 Android 记录所有内容,可以使用 LogCat 查看。
Check out the DDMS perspective and LogCat view. Android logs everything, what can be viewed with LogCat.
您应该阅读本指南:使用 Eclipse 和 ADT 调试 Android
You should read this guide: Debugging Android using Eclipse and ADT
您可以直接在命令提示符下键入
adb logcat
,它将显示堆栈跟踪。有关更多信息,请参阅此页面:http://developer.android.com /guide/developing/tools/adb.html#logcat
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