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?

2
  • what is your function doing? without any example(and crystal magic ball) it's hard to talk about possible reasons
    – ilmash
    Oct 25, 2016 at 0: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, 2016 at 11:08

6 Answers 6

13

Make sure your debugger option is correct.

4
  • 5
    How would someone display the "debugger option" you are talking about? I don't see anything like the image.
    – Dronz
    Apr 1, 2019 at 20:42
  • 3
    that image has no context, how do you get there?
    – CodyMace
    Apr 30, 2020 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. Aug 3, 2020 at 15:21
  • so when im using kotlin so what should i do #ZhenXu Nov 19, 2020 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.

1
  • 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. Jun 2, 2017 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

1
  • a small answer like this can be comment Jun 2, 2020 at 9:00
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.

0

Breakpoints image

Unchecked these check boxes. It solved my issue

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.