Intellij Debugger slow: Method breakpoints may dramatically slow down debugging

Intellij Idea

Intellij Idea Problem Overview


When I start intellij debugger, it comes the the hint you can see in the screenshot. the debugger takes a lot of time to start. How to solve this problem?enter image description here

Intellij Idea Solutions


Solution 1 - Intellij Idea

Turn off the method breakpoints. You can see all your breakpoints through Run | View Breakpoints (Ctrl - Shift -F8 )

Solution 2 - Intellij Idea

enter image description here

Turn off the method breakpoint from the debug panel. Here is a screenshot.

Solution 3 - Intellij Idea

In IDEA 2017.1 Emulated Method Breakpoints were introduced: https://www.jetbrains.com/help/idea/using-breakpoints.html#method_breakpoint They allow using method breakpoints without the performance penalty. Enabled by default.

Solution 4 - Intellij Idea

From the JetBrains Team: "Method breakpoints will slow down debugger a lot because of the JVM design, they are expensive to evaluate. Remove method breakpoints and consider using the regular line breakpoints.". See more.

To make the long story short, it seems that the root issue is that Method Breakpoints are implemented by using JPDA's Method Entry & Method Exit feature. This implementation requires the JVM to fire an event each time any thread enters any method and when any thread exits any method.

Solution 5 - Intellij Idea

Look for the red diamond icons (not red circles) in your code, those represent the method breakpoints. Most probably you set them at get()/set() methods in Kotlin.

Solution 6 - Intellij Idea

In my case, I used Android Studio, When I set Break-Point on a method name line (called Java Method Break-Point), The Android Studio show me the this warning and debugging was so slow...

By removing this Break-Point my problem solved...

enter image description here

enter image description here

Solution 7 - Intellij Idea

Practical advice that I follow:

  1. mute all the breakpoints while the app is coming up
  2. enable breakpoints only while debugging that flow.

Of course, it won't help if you are trying to debug something which happens during app startup.

Solution 8 - Intellij Idea

View Breakpoints - (Ctrl - Shift -F8 ) Remove all method Breakpoints. rerun the application in debugging mode . its working f

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRonaldView Question on Stackoverflow
Solution 1 - Intellij IdeaRobinView Answer on Stackoverflow
Solution 2 - Intellij IdeaChetan GaikwadView Answer on Stackoverflow
Solution 3 - Intellij IdeaEgorView Answer on Stackoverflow
Solution 4 - Intellij IdeanhoxbypassView Answer on Stackoverflow
Solution 5 - Intellij IdeabladeView Answer on Stackoverflow
Solution 6 - Intellij Ideaultra.deepView Answer on Stackoverflow
Solution 7 - Intellij IdeaSudip BhandariView Answer on Stackoverflow
Solution 8 - Intellij Ideadattatraya vairalView Answer on Stackoverflow