Intelliji idea is very slow in debug mode and it is running perfectly in normal mode.
I already tried by setting the below thing in /etc/hosts file sudo nano /etc/hosts and add these two entries.
127.0.0.1 .local ::1 .local
But it did not work out for me.
Any help on this is highly regarded.
Turning off the setting Enable toString() data views solved this problem of slow debugging. Incase you are experiencing slow debugging issues on IntelliJ, do make sure that this setting is turned off.
It's slow because debug mode turns off the optimiser and enables a bunch of expensive runtime checks, such as out-of-bounds array indexing and memory overrun detection. The core issue is that you simply have very unrealistic expectations of how fast the code should be in a Debug build.
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 .
The only way to do that is to set a break point outside the loop, or position the cursor outside the loop and do "run until cursor".
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.
Method breakpoints may dramatically slow down debugging
There is a simple explanation from the IntelliJ Team: "Method breakpoints will slow down debugger a lot because of the JVM design, they are expensive to evaluate"
https://intellij-support.jetbrains.com/hc/en-us/articles/206544799-Java-slow-performance-or-hangups-when-starting-debugger-and-stepping
I had the similar issue. In my case it was method breakpoints. There was just one break point on a method. My spring boot app took around 20 mins to launch. When I removed the breakpoints it took 4 seconds to launch.
I also changed the debugger settings.
but these settings didn't make a difference.
If you disable this options in Build, Execution, Deployment -> Debugger -> Data Views --> Java, things will start work faster when debugging.
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