89

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.

8
  • 1
    Could some sort of profiling have been enabled? Commented Jan 4, 2011 at 6:36
  • I just switched from Galileo to Helios but without any improvement. Commented Jan 4, 2011 at 6:58
  • How could I enabled/disable profiling? Commented Jan 4, 2011 at 7:01
  • debugging a regular program, or a plugin/rcp? Commented Jan 4, 2011 at 7:05
  • A regular program (using Spring and Maven). Commented Jan 4, 2011 at 7:07

16 Answers 16

218

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

Sign up to request clarification or add additional context in comments.

12 Comments

I've created a new workspaced and checked out the there anew. Now debugging works as excepted. Do you know how I can fix my old workspace?
I can only recommend to abandon it unless you want to learn about the meaning of approximately 1.000.000 files in the .metadata directory of your workspace. I have no idea of how to recover... There is the fairy tale of adding "-clean" once to the commandline, but it never helped...
Starting Eclipse with "-clean" fixed it for me. :-)
Thank you, removing the method entry breakpoint that I had already forgotten about solved my performance problems!
Thank you. For me, it was removing all breakpoints and expressions that helped. What's curious is that these very breakpoints did not cause problems in the past - and suddenly, from one application startup to the next, they do. It seems to be an internal problem of eclipse.
|
35

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

Comments

14

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

1 Comment

This was helpful for me - i had breakpoints from other projects in the same workspace, i deleted them all and my current program debug sped up
13

For some older versions of Eclipse (picture below, 2017): disable option 'Show method result after a step operation'.

Edit (2023): Eclipse version 2023-06 (4.28.0) does not have this problem.

Show method result after a step operation

6 Comments

That was it. For IntelliJ IDEA users, do this one.
What is the exact equivalent voice in Intellij?
Actually why 'Show method result after a step operation' is used??
strange, I got slightly different options: i.sstatic.net/1DX6b.png (also 2023-06 [4.28.0] or even for 2021-12 )
I see... I misunderstood the previous edit (adding 2023 version) - I was confused because the mention of 2023 came first. Now it's clear
|
7

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

2 Comments

This one worked for me, thank you very much!, btw you don't need to close eclipse.
@Navdeep Garg, you saved my day! I was desparately searching for a solution since a whole week now and I was running in the completely wrong direction: I suspected to a windows update, that has recently been installed on my computer - Thanks for that simple solution.
5

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.

Comments

4

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.

Comments

2

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.

Comments

1

Clearing temp files on Windows fixed it for me

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

Comments

1

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.

1 Comment

Thanks, This helped me with my kafka stream application. Application was working in run mode, but was timing out while debugging.
0

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.

3 Comments

Normally Java Virtual Machine turns off Just in time compiler (JIT) when running in debug mode this is simply untrue. the method is optimized normally when a breakpoint is set the method is deoptimized and executed by the interpreter.
Older IBM JVM (1.4-) was very slow indeed. Anyway de-optimizing method, rebuilding stack trace and so on is a SLOW operation, isn't it?
Deoptimizing is need only for breakpoint in debug mode - NOT for getting stacktrace alone. Deoptimizing is of course a very slow process. Stacktraces SHOULD not be generated (i.e. walk the stack) unless necessary, that is if an exception doesn't print its stacktrace or getStackTrace is not called. AFAIK both Sun and IBM's JVM 1.4 run w/ normal speed in debug mode (sure about Sun's)
0

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

Comments

0

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.

Comments

0

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.

Comments

0

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.

Comments

0

I've had the same problem. The work around i'm using is to just set a single break point and run to it. After that I don't try to step over or continue i just restart the test and move my break point to the next line I want to view. I am using JUnit with Mockito in Intellij. I'm guessing it has something to do with the byte code manipulation not matching the actual code in intellij. (In intellij, there is an implementation internal to intellij for running JUnit tests. Mockito may not play will with it)

1 Comment

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review