25

My Android app runs dead slow (almost frozen) after resuming from a Java breakpoint, even if I disconnect from the debugger or even unplug the USB cable. I get the same behavior on every device and emulator I've tried. Performance is great until it hits the first breakpoint, but it's unusable after I resume and I have to kill it. It's very frustrating.

It used to work great but it started with Android Studio 3.1.x and it's still happening after I upgraded to 3.2.1, then 3.3.2, the latest stable release at this time. None of my colleagues who work on the same app have this problem so it's probably not the code. I suspect I have a configuration issue somewhere.

I have no idea what changed when it started. It happens no matter where the breakpoint is. I don't see any errors in LogCat.

I'm using a MacBook Pro (15-inch, 2017) running OSX 10.13.6, Android Studio 3.3.2 (current stable release) and a Pixel XL running P. Also various emulators running P.

Any ideas or suggestions are much appreciated.

NOTE: It happens on Java breakpoints but not Kotlin.

NOTE: I cannot repro with a simple default app, so it's project specific, but only on my machine.

Barry Fruitman
  • 11,209
  • 10
  • 64
  • 121
  • Which MacBook Pro? – TheWanderer Nov 14 '18 at 01:04
  • MacBook Pro (15-inch, 2017) – Barry Fruitman Nov 14 '18 at 01:06
  • 1
    @BarryFruitman Did you ever find the cause of this? I experience the exact same thing, also on a MacBook Pro though mine is 2015. – pdub Jan 03 '19 at 19:00
  • What type of breakpoints? method declaration ? or regular lines ? – tec Mar 18 '19 at 15:36
  • @BarryFruitman Did you added breakpoint to method that too causes slow down – Venky Mar 24 '19 at 21:21
  • Possible duplicate of [Why do method breakpoints impact performance so negatively?](https://stackoverflow.com/questions/23652994/why-do-method-breakpoints-impact-performance-so-negatively) – Pedro Rodrigues Mar 25 '19 at 12:30
  • 1
    This is not a dupe. I've been debugging apps on Android Studio for years and I'm very familiar with debug performance. Performance is fine even with breakpoints enabled, until it hits the first breakpoint and resumes. After that the app is basically frozen and must be shut down. Even the system buttons are slow to respond. – Barry Fruitman Apr 03 '19 at 15:09
  • @PedroRodrigues I never use method breakpoints. – Barry Fruitman Apr 03 '19 at 15:09
  • Mac Book pro 2015. Same issue. Android Studio 3.4.1, Pixel 2 – Pavel Jun 06 '19 at 20:47
  • I deal with the same problem with all breakpoints on my Toshiba-Notebook with Windows 10 (1903). Did you find a solution? – Petterson Mar 27 '20 at 09:17

3 Answers3

0

enter image description here

make sure your debugger is ok .

ROCFER
  • 267
  • 2
  • 9
0

Don't add breakpoint in the method definition. Method breakpoint will decrese the performance. Go with line breakpoint. That is better.

Please go through the difference b/w method breakpoint and line breakpoint if you are not aware.

Magudesh
  • 319
  • 3
  • 12
0

Try to remove all the previous breakpoints that you might have added in Android Studio.

Go to the debugger window and select the View Breakpoints option and then disable all the old breakpoints and only add the new one which you want to use.

Debugger section

Disable all old breakpoints

shubhamgarg1
  • 826
  • 1
  • 7
  • 18