I'm using android studio 1.5.1 and trying to debug a very simple application on an emulator. I've tried emulators with version 18-23 and all do the same thing. Basically it will suspend the thread for method level breakpoints but not for any line break points.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
By default only the thread that hits the breakpoint stops. However, you can modify the behavior by changing the breakpopint properties. Save this answer.
Breakpoints break before executing the line on which they are placed.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.
If you are trying to debug multithread apps in Android Studio, you could have troubles with some of your breakpoints, so it's better to enable an Android Studio option to pause all threads by default setting.
Double click your breakpoint and make default the "Suspend All threads" option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With