Running a program in Debug mode is incredible slow

JavaEclipseDebugging

Java Problem Overview


Since recently it's much slower running a program in Debug mode in Eclipse Galileo.

I'm not aware of any changes.

Do you know what could be the cause? Running it normally is not a problem.

Java Solutions


Solution 1 - Java

Another "debugging break" is the use of method entry/exit breakpoints.

Did you try to remove all breakpoint definitions once?

Sometimes i think Eclipse is getting out of synch with some of its internal/displayed state. Perhaps you should try to setup a new (not copy) of your workspace. This sometimes helps me to recover from spurious features.

This is how you can remove all breakPoints

Eclipse -> Run -> Remove All Breakpoints - for removing all Breakpoints for all Time

Eclipse -> Run -> Skip All Breakpoints - for temporary remove breakpoints

Solution 2 - Java

I faced this issue lot of time. Solution is simple, Remove all breakpoints. (Run >> Remove All Breakpoints)

Solution 3 - Java

I was just running a program in Eclipse debug mode that was almost instant without debugging but when I ran it in debug mode, it was really slow. I went through and deleted a ton of random useless breakpoints I wasn't using and then the program sped up A LOT (200x or so).

Solution 4 - Java

Disable 'Show method result after a step operation'.

Show method result after a step operation

Solution 5 - Java

Close eclipse... clear %temp% folder, temp folder... disable breakpoints... in most cases this will definitely solve the problem.

Solution 6 - Java

I have found that i often forget that i have a bunch of expressions added to the expressions panel that are no longer needed that are none the less being evaluated (or are failing to evaluate) and this slows stuff down a good deal. Make sure that you keep those expressions cleared out when not needed.

Solution 7 - Java

What kind of JVM are you attaching to? I found in my experience, that in debug mode IBM JDK is slow like hell. For all JVMs, check if you have conditional breakpoints with expensive condition. Try disable breakpoints. You may have exception breakpoints or expressions. Try disable or remove them.

Solution 8 - Java

In my case, Eclipse was trying to build files, which I was doing manually. Going to Window -> Preferences -> Run/Debug -> Launching, and then disabling "Build (if required) before Launching" underneath General Options solved the slowness.

Solution 9 - Java

Clearing temp files on Windows fixed it for me

"C:\\Documents and Settings\\{user}\\Local Settings\\Temp"

Solution 10 - Java

Normally Java Virtual Machine turns off Just in time compiler (JIT) when running in debug mode. On IBM WebSphere, the IBM JDK is heavy de-optimized and will be very slow. By the way debugging also make impossible to recompile and optimize the code.

Relay on logging for complex debugging: it will save your days on production, where you cannot debug for sure.

Solution 11 - Java

With all the learning over the years working with eclipse, here are couple of suggestions

  1. keep your open projects to minimal what you actually need
  2. keep it lean and thin - uninstall the plugins/features which you don't use (mylnn, validations etc).
  3. No matter what you do, the eclipse tend to get slower over the time. The ultimate solution to get a responsive IDE is to recycle your existing workspace (create new workspace and bring in the projects which you need).

Solution 12 - Java

Before you run your application in debug mode press on Button (disable all breakpoints) and you wont experience slow loading or any problems. After your application has started just enable the breakpoints and then you can debug your code.

Solution 13 - Java

I faced this issue recently after upgrading my macOS version. I wasn't able to fix the slow debugger with all the above solutions, I ended up installing a newer version of eclipse, and everything works prefect after that.

Solution 14 - Java

It happened to me once and the problem was, I had the folder with ALL my projects source code in the Source Look-up. This way, not only the debugger got really slow (because it probably crawled all my files) but also I could not do a lot of things such as inline execution.

The takeaway: check your Source Look-up. When debugging right-click in any thread from the Debug view, choose Edit Source Look-up and see what what you can/should remove from there. In my case, it was a spurious folder, other times you may have too many projects, folders, JARs etc. and may remove some.

Solution 15 - Java

Recently i was having extreme slow performance debug, both in eclipse and visual studio code (vs code)

In my case, the problem was with lombok configuration in JPA entities.

I changed the @Data anottation to @Getters and @Setters.

Looks like hashCode() and equals() implementantion of lombok was in conflict with JPA.

Solution 16 - Java

Clearing all breskpoints .. Worked for me

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser321068View Question on Stackoverflow
Solution 1 - JavamtrautView Answer on Stackoverflow
Solution 2 - JavaVarun MylaraiahView Answer on Stackoverflow
Solution 3 - JavazelinkaView Answer on Stackoverflow
Solution 4 - JavaceklockView Answer on Stackoverflow
Solution 5 - JavaNavdeep GargView Answer on Stackoverflow
Solution 6 - JavaMeBigFatGuyView Answer on Stackoverflow
Solution 7 - JavaGábor LiptákView Answer on Stackoverflow
Solution 8 - JavacalView Answer on Stackoverflow
Solution 9 - JavaMike FlynnView Answer on Stackoverflow
Solution 10 - JavadaitangioView Answer on Stackoverflow
Solution 11 - JavaNrjView Answer on Stackoverflow
Solution 12 - JavaAlex VulchevView Answer on Stackoverflow
Solution 13 - JavaHany SakrView Answer on Stackoverflow
Solution 14 - JavabrandizziView Answer on Stackoverflow
Solution 15 - JavaDaniel ReisView Answer on Stackoverflow
Solution 16 - JavaRajesh WaranView Answer on Stackoverflow