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!
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. To verify that you don't have any method breakpoints open .
Remove breakpoints off your method and use them inside the method as that can cause your debug to take a very long time. Try running IntelliJ as admin. I had this issue at work where debugging was extremely slow and running as admin actually made it a lot faster.
debug code runs a lot slower than release - Visual Studio Feedback.
Breakpoints are special markers that suspend program execution at a specific point. This lets you examine the program state and behavior.
By default, IntelliJ IDEA sets an emulated method breakpoint, which is a combination of line breakpoints set at first statements of all implementing or overriding methods. Such emulated breakpoints do not impact the debugged application performance, while "true" method breakpoints slow the debugger dramatically due to the JVM design.
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.
Also, please remember that IDEA consumes a lot of RAM memory and your system may not have enough memory for other processes causing it to use disk swap and thus degrade performance significantly. Is your code slow anywhere? Wel Which is better for Java development: Eclipse or IntelliJ IDEA?
After all IntelliJ is a payed platform and it should run fast. Note: i also teach a free course Become an IntelliJ IDEA guru where you can find more about different actions you can use in IntelliJ. Why use Intellij IDEA over Eclipse? goddamn miracle The code completion is miles ahead of any other IDE, not just the Java ones.
Method breakpoints are extremely expensive to evaluate. According to JetBrains, the JVM isn't set up to handle this efficiently.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With