Ronald
Ronald

Reputation: 2917

IntelliJ Debugger slow: Method breakpoints may dramatically slow down debugging

When I start IntelliJ debugger, it shows a tooltip that says:

Method breakpoints may dramatically slow down debugging

Screenshot: tooltip: Method breakpoints may dramatically slow down debugging

The debugger takes a long time to start. How can I solve this problem?

Upvotes: 154

Views: 94164

Answers (8)

Sudip Bhandari
Sudip Bhandari

Reputation: 2275

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.

Upvotes: 3

Robin
Robin

Reputation: 36611

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

enter image description here

Upvotes: 294

dattatraya vairal
dattatraya vairal

Reputation: 19

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

Upvotes: -2

ultra.deep
ultra.deep

Reputation: 1809

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

Upvotes: 7

Chetan Gaikwad
Chetan Gaikwad

Reputation: 1268

enter image description here

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

Upvotes: 35

blade
blade

Reputation: 843

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.

Upvotes: 7

nhoxbypass
nhoxbypass

Reputation: 10152

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.

Upvotes: 11

Egor
Egor

Reputation: 2664

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.

Upvotes: 15

Related Questions