6

I've always known that method breakpoints make programme run a lot slower in debugger compared to a normal breakpoint.

Could someone with deep knowledge of debugger explain in relatively layman's language why is it so?

Thank you!


UPDATE

Thank you for the reply. I understand several similar questions have been asked here in the past, but I find none of them offer a detailed explanation and most of the answers point it out as "JVM design" without giving further details.

I know it's not always easy to explain complex subjects such as this in simple terms, but would appreciate if someone with the knowledge could try to explain it. I'd like to have a slightly better understanding of the subject than just knowing to avoid it.

Thanks!

Andy
  • 115
  • 1
  • 6
  • Possible duplicate of [Why do method breakpoints impact performance so negatively?](http://stackoverflow.com/questions/23652994/why-do-method-breakpoints-impact-performance-so-negatively) – BamaPookie Mar 09 '17 at 18:02

1 Answers1

10

Method breakpoints are extremely expensive to evaluate. According to JetBrains, the JVM isn't set up to handle this efficiently.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
BamaPookie
  • 2,560
  • 1
  • 16
  • 21
  • 2
    We also added [emulated method breakpoints](http://i.imgur.com/XzSccfS.png) to workaround this problem, it has pros and cons, as usual. Will be available in 2017.1 under the `debugger.emulate.method.breakpoints` registry key. – CrazyCoder Mar 09 '17 at 19:48
  • @CrazyCoder Thanks! Look forward to the new update. :-) – Andy Mar 09 '17 at 23:25