How can I visualize Android call stack using Eclipse?

寵の児 提交于 2020-01-15 03:46:08

问题


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!


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/9295971/how-can-i-visualize-android-call-stack-using-eclipse

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