如何使用 Eclipse 可视化 Android 调用堆栈?
无论如何,我可以可视化 Android 应用程序的调用堆栈吗?我在 Eclipse 中能找到的只是正在运行的线程:
我想要的是查看我的子例程如何调用以调试与活动返回堆栈相关的问题。
谢谢!
Is there anyway I could visualize the call stack of an Android app? All I can find in Eclipse are the running threads:
What I want, is to see how my subroutines are called in order to debug an issue related to the activities back stack.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在任何线程中看到瞬时调用堆栈。在 Eclipse 的 DDMS 透视图中,单击“Threads”窗口。
开始时它是空的。在“设备”窗口中选择您的进程,然后单击“设备”列表中进程列表上方的线程按钮。
现在您将在“线程”窗口中看到线程列表。单击其中一个线程,然后按下面的“刷新”按钮。您将看到该线程的瞬时堆栈跟踪。
You can see the instantaneous call stack in any of your threads. In the DDMS perspective of Eclipse, click on the Threads window.
It'll be empty to start. Select your process on the Devices window, then click on the threads button above the list of processes in the Devices list.
Now you'll see a list of threads in the Threads window. Click on one of the threads and then press the Refresh button below. You'll see the instantaneous stack trace of that thread.
在代码中的某处添加断点并在调试模式下运行,然后您可能会看到调用堆栈。 AFAIK,在运行模式下它只显示线程和进程的数量。它不显示调用顺序。
Add break points in your code somewhere and run in debug mode, you may see call stack then. AFAIK, While run mode it just displays number of threads and process. It doesn't display sequence of calls.