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.
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"
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.
I have solved a similar problem by disabling breakpoints; it was remote debugging. I did not make any performance measurements, but it looks like it is ok to have about 10 active breakpoints, but disastrous to have about 100 of them (I guess, the breakpoint list is sent over the network).
Idea lets you to group breakpoints and disable the whole groups.
Note that a click on the wrong mouse button clears your breakpoint instead of letting you edit its condition, so be careful!
Make sure that you don't use "biz.paluch.logging.gelf.logback.GelfLogbackAppender" among your logs. In my case usage of such kind of appender was the cause of drastically slow starting in debug mode.
I faced similar problem with the Eclipse also and found the solution. It is happening because your IntelliJ is using online Java and not using the same which is installed in your system.
You should set the java path to your system one in the IntelliJ configuration. Below link will help you for the same:
https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
Hope this will help you. :-)
从 DAO 接口中删除断点,一切正常!
In my case, slowness is specific to REST calls. After testing all of the above proposed solutions, I finally find a way to remove these slowness issues by switching my JDK from JDK 11 to JDK 8.
Note: The same slowness appears in Visual Studio Code. This seems related to JDK 11 (OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode) on macOS)
在我的情况下,我只需要禁用该选项:“显示方法返回值”选项的图像
In my case i had more than 100 breakpoints active and this was the cause of this issue.
I clicked Ctrl + Alt + F8
and disabled all the breakpoints.
After that i enabled few new breakpoints i needed and all was ok.
It seems that having a lot of active breakpoints causes this issue.
我也遇到了同样的问题,删除所有断点后它开始工作正常。
删除所有接口方法断点将修复长时间的spring boot启动Idea调试运行。
In my case the problem was caused by the "Threads" view. When I remove this view it becomes fast again.
When I add the Threads view, I continuously see "Collecting data..." in the threads view, it flickers every 5s where the threads list shows for a moment then it goes back to "Collecting data...". When its like this, stepping through the code is painfully slow - takes about 10s for each step.
I cam across this post looking for a solution for my CLion (Rust). I removed all breakpoints, and it was enough to make the starting time on the debug mode too quick again.
Thanks to everyone who suggested that. This suggestion does not work only for Java, it also works for Rust/Clion
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.