6

After noticing that some breakpoints are not getting hit, I found this post that answers why:

Breakpoints not working on Android Studio 3.3

I don't recall this happening prior to Android Studio 3.3. Is there any way to stop this behavior so that breakpoints will get hit on conditional statements?

Vodet
  • 1,491
  • 1
  • 18
  • 36
user982687
  • 325
  • 6
  • 14

3 Answers3

4

Found here setting minifyEnabled false in the debug build is the best practice.

I just change minifyEnabled in build.grandle to 'false' on debug buildTypes and it works!

JustKhit
  • 407
  • 3
  • 9
  • did it really work for you? Did you really had the same issue has @user982687, I already had minifyEnable = false on every buildType and upon upgrading I have the exact same issue has the OP. What bugs me the most, is that breakpoints on conditional statements are the most useful to me, and they were working before! – dsilveira Feb 14 '19 at 11:08
  • I don't know why Khdkls's answer is not selected as "Best Answer"! – MeLean May 23 '20 at 18:42
  • 1
    When proguard is enabled, the breakpoints won't work. The method names and attributes would have been obfuscated. – Joseph Jun 03 '20 at 13:25
3

Rebuild solved my problem.

clean & rebuild

Invalidates caches/restart if necessary

user2301281
  • 757
  • 2
  • 12
  • 27
0

In my case I fixed the problem by updating Android Studio to the latest version 4.0.1.

Roberto Petrilli
  • 711
  • 1
  • 8
  • 22