15

Since the update to version 2.21 the Debugging has become very slow. One exmaple: When I start my app without the debugger in completes one function in less than 2 seconds. With the debugger connected I have to wait more than 4 minutes for its completion. The update 2.2.2 did not solve this problem. What can I do to increase the debug speed again?

zimmerrol
  • 4,872
  • 3
  • 22
  • 41
  • what is your function doing? without any example(and crystal magic ball) it's hard to talk about possible reasons – ilmash Oct 25 '16 at 00:59
  • @ilmash: It does not depend on the function - this behaviour is the same for all functions I have tested; even when they only perform simple operations. – zimmerrol Oct 26 '16 at 11:08

6 Answers6

13

Make sure your debugger option is correct.

Pang
  • 9,564
  • 146
  • 81
  • 122
Zhen Xu
  • 178
  • 1
  • 3
  • 5
    How would someone display the "debugger option" you are talking about? I don't see anything like the image. – Dronz Apr 01 '19 at 20:42
  • 3
    that image has no context, how do you get there? – CodyMace Apr 30 '20 at 15:54
  • 1
    Here where you can find it : After you run the debug button, next(2-3 button after) to that "Attach debugger to android process" button would be there, just click and choose your package and choose the "Java only" from the select box. – user5071155 Aug 03 '20 at 15:21
  • so when im using kotlin so what should i do #ZhenXu – Mohammad Zeeshan Nov 19 '20 at 13:30
9

See this, it helped me massively:

Intellij Debugger slow: Method breakpoints my dramatically slow down debugging

I was waiting up to a minute when debugging for the first webservice call to return. CPU and memory monitors peaked during this period. Removed the Java Method Breakpoints and hey presto, back to normal.

Community
  • 1
  • 1
Nick Wright
  • 1,403
  • 13
  • 19
  • Had slow and difficult to use debugging with a clean Android Studio 3.0 (canary build at this time). This includes debugging without method breakpoints. Fix was to return to 2.3.2 at this time. Same code. YMMV. – CmosBattery Jun 02 '17 at 21:35
2

check your break-points added to your code for debugging before, I fixed this problem with release break-points that added on UI function

Amir Ardalan
  • 389
  • 3
  • 7
0

Check as well if you didn't add function breakpoints. They are drastically slowing down the debugger.

You can check the line breakpoints in Debug menu -> View Breakpoints icon (Ctrl + Shift + F8) The function line breakpoints are in red rhombus shape (not circle). Either disable them or better remove them. You should observe immediate improvement in debugger speed.

Borislav Kamenov
  • 561
  • 4
  • 12
0

Breakpoints image

Unchecked these check boxes. It solved my issue

Usama Zafar
  • 77
  • 1
  • 3
0

Changing Debugger option to Java Only in Android Studio Flamingo (same option for Kotlin):

Go to Run -> Edit Configurations

choose tab Debugger in app

J Rom
  • 51
  • 1
  • 4