Sebi
Sebi

Reputation: 4522

Android studio keeps jumping over/not hitting breakpoints

I'm experiencing random behavior in android studio (4.1.1). When hitting debug (Shift + F9) the first breakpoints are being hit but sometimes when stepping through code (F8), there is some lag and chunks of 5, 10 lines are jumped over in quick succession.

Sometimes, when resuming execution (F9), breakpoints that are supposed to be hit (button handlers (same buttons pressed)) are no longer hit even they were hit on the first run.

I thought it to be related to win defender scanning(hooking writes to) the project dir but it seems that's not the case.

Anyone else struggling with this?

Upvotes: 1

Views: 812

Answers (1)

Jameido
Jameido

Reputation: 1354

It may be caused by code running on different threads. Right click on the breakpoint and switch from Thread to All, see the screenshot below.

breakpoint thread

Upvotes: 4

Related Questions