Android Studio threaded debugging Android Studio threaded debugging multithreading multithreading

Android Studio threaded debugging


In IntelliJ IDEA (and Android Studio is based on IntelliJ), when you place a breakpoint, if you do right click over it a dialog is displayed and you can select whether to pause all threads (the default) or only that thread.

You are pausing all the threads as it is the default setting.


In Android Studio, it's possible to specify whether a given breakpoint will suspend execution of just the executing thread (that triggers the breakpoint) or all threads. This is on a per-breakpoint basis (i.e. some breakpoints can suspend all threads, while others only suspend the current thread).

Right-click on a breakpoint to bring up the Breakpoint Properties window:

Breakpoint properties

Note the 'Make Default' option which allows this to be defaulted for all newly created breakpoints.

If only the current thread is suspended (option "Thread" in the image above), then the stack-frame of other unsuspended threads will not be visible in the Frames window:

Frames not available for unsuspended thread