111

While on a break point, how do I see the call stack to find the callee method/function?

IsmailS
  • 10,797
  • 21
  • 82
  • 134

3 Answers3

155

Seems like there is an UI-Bug in the Android Studio (1.x, 2.x and 3.x).

For me the "Frames/Threads" Panel was completely hidden behind the toolbar, so I had to change the size from the "variable" panel by dragging its left border to reveal the "Frames/Threads".

Example

[I have to admit, that @Greg added this picture after reviewing my answer!]

Community
  • 1
  • 1
longi
  • 11,104
  • 10
  • 55
  • 89
120

At the bottom panel you should have "5: Debug". Click on it and select "Debugger -> Threads"

You may need to find the "Threads" icon on the far right, or even click the "Restore Layout" button on the left to restore this window.

enter image description here

Basem Saadawy
  • 1,808
  • 2
  • 20
  • 30
Nickolai Astashonok
  • 2,878
  • 3
  • 20
  • 23
  • 1
    I see only: { Debugger, Console, Logcat }. Where is "Threads" ? – ARLabs Feb 06 '15 at 10:10
  • 6
    Thanks Nickolai, I didn't find "Threads" because I had closed it. I clicked on the icon on the right of the Tabs and I reopened it. – ARLabs Feb 09 '15 at 14:15
  • 3
    This took me ages to find and is very counter intuitive. :( . You can turn off the terrible counter intuitive hiding on the settings cog in the extreme top right of the debug window and ensure "Show Views as Tabs" is unchecked – Rob McFeely Jun 05 '15 at 07:48
  • It may be minimized to the right, find the button with the little arrow pointing at a line (top right corner of the bottom panel) and click it. It will expand again – Alon Oct 20 '16 at 23:00
  • i can see the call stack, but how do I see the PC of each frame? – Michael Aug 11 '17 at 17:14
  • very nice ! Thank you – Almeida Apr 21 '18 at 19:27
0

It depends on the version of Android Studio. In Android Studio 4.x (screenshot from 4.1.3), it is the camera icon on the left, as seen in the screenshot. Hover over it and you see "Get thread dump", even though it may be counter-intuitive, being more often associated with taking a screenshot.

Android Studio 4.1.3 example

I just checked Android Studio Dolphin, it is the same button.

auspicious99
  • 3,902
  • 1
  • 44
  • 58