Android Studio threaded debugging

ぐ巨炮叔叔 提交于 2019-11-30 01:14:52

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:

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:

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