Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ idea slow/hang during debug make phase

Currently experiencing very slow debug start up times (between 25-45 seconds) with idea CE 14.1.5. To reproduce:

  • Make change in code that will cause javac to be invoked.
  • Hit debug.
  • Status bar shows "Make" and entire IDE hangs.

I'm using a 2015 Macbook pro and Java 1.8.0_60 64bit.

like image 713
imrichardcole Avatar asked Oct 18 '15 16:10

imrichardcole


People also ask

Why does IntelliJ debugger take so long?

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.

Why IntelliJ is too slow?

Increase memory for IntelliJ IDEA By default, the IDE requests a maximum of 2048 MB. You can change this option in Help → Change memory settings. According to the feedback from some of our users and colleagues with big projects, changing the option to 8GB significantly improves IDE performance.

How do I get out of loop while debugging in IntelliJ?

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".

Why debug is not working in IntelliJ?

To solve this, simply remove the jar of the debugged module from all modules' dependencies in the Project Structure. If you do not know which modules have the debugged module jar as dependencies, you can use some tools (Eg. Sublime Text, bash, ...) to search for the module name which is stored in Intellij *.


1 Answers

After profiling with advice from above, I tracked it down to this issue:

IntelliJ freezes for about 30 seconds before debugging

Which in turn points to an issue with InetAddress.getLocalHost() on *nix. Following the advice in this linked post certainly helped it go away:

InetAddress.getLocalHost() throws UnknownHostException

like image 167
imrichardcole Avatar answered Oct 01 '22 22:10

imrichardcole