Eclipse freezes when adding a breakpoint - eclipse

When I add a breakpoint, Eclipse freezes for some about 5 seconds. Sometimes it takes much longer until I can continue work, up to one minute. It does not depend on how I set the breakpoint (double-clicking on line numer, or via shortcut ctrl + shift + b) or which view is open (Java View, Debug View...) or if Debugging is active.
Removing a breakpoint works immediately without any problem.
The problem also only occurs in one workspace. I can't see any entry in the Error Log.
I'm using Neon.3 Release (4.6.3)
What could cause this effect?

This appears to be due to a bad index file. I deleted *.index in
{WORKSPACE}/.metadata/.plugins/org.eclipse.jdt.core and this fixes the problem. Note that by doing this, you're forcing Eclipse to re-index all .java files. Thus, the first time you go to add an Exception breakpoint, you can expect a wait of several minutes while all classes.
But once all things are settled for the first time, it will become smother.

I upgraded to Oxygen.1a Release (4.7.1a), but still had the issue. Then I deleted my workspace and set it up newly. The issue dissapeared. My assumption is that there were some corrupted configurations. However, it is solved with a new workspace (that worked for the older Neon version, too).

I am working in Linux Ubuntu 16.04 using OpenJDK 1.8 and eclipse v4.15 by installing java-2020-03. Eclipse froze occasionally during debugging but not always. To get around the freezing, I passed the VM argument -Dsun.awt.disablegrab=true. Now I can debug without freezing.

Related

Eclipse Neon.3 fails to launch after install

I've installed Eclipse Neon.3 on my windows 7 machine, after the install process has finished, the installer has an option to 'launch now', which I do and the IDE boots up and works as expected.
However when I close eclipse and then reopen it, I get a crash which prevents it from booting up (sorry for this being a picture, but there doesn't seem to be an easy way to copy the text):
The version I've installed is Release 4.6.3, and the build ID is 20170314. I've installed and removed it 3 times and observed the same behaviour each time. I've tried doing a reset between boots and installs. I've also tried inspecting my environment variables, which look like this:
JAVA_HOME:C:\Program Files\Java\jdk1.8.0_91
PATH: %PATH%;%JAVA_HOME%\jre\bin
Is this a known issue, or do I have something wrong in my setup? Prior to this I discovered 4 versions of the jre/jdk on my machine, and two versions of eclipse. I think I have correctly removed all but the one referenced from my java home, and I entirely removed eclipse and downloaded the latest version (neon.3).
I've fixed the issue, and whilst I'm still not entirely sure why it was a problem, here is how I fixed it.
I opened a terminal and ran 'java -version' (I should have done this first). It was failing to find java.exe, despite the bin folder being on the path. Running this revealed that it was actually calling a shortcut to java.exe found in 'c /programdata/oracle/java/javapath/' which pointed to a now non existent version of java.
So long story short, if you have a similar problem, check if you have shortcuts in the folder 'c /programdata/oracle/java/javapath/java.exe' and ensure they point to the correct program.

Eclipse not noticing changes to eclipse.ini?

I have had a problem lately with jvisualvm not allowing me to take heap dumps and showing very little information at all. I believe this is my problem.
I made the suggested changes to eclipse.ini. It currently looks like this:
The line in question here is then line 19.
Now, when I check the configuration in Eclipse, the new option doesn't show up.
I have restarted Eclipse twice, both via File -> Restart and closing and re-opening, with no effect. Also, I have changed the order of the options in the file, with no effect.
What might cause this and can this be fixed somehow?
EDIT: I also tried closing Notepad++ and then restarting. No effect. type in the command prompt still shows the changes, so they are there.
I managed to solve it by running Eclipse in clean mode, as described here.
I ran Eclipse from the command prompt:
C:\Program Files (x86)\Eclipse>eclipse -clean
This can be done in other ways also, as seen the answer linked above.
At this point, the problem is solved. The rest of the steps are what happened.
I had to choose my workspace again, as the cache had been cleared.
Package Explorer failed to load.
After one more restart, everything worked fine.

Eclipse Kepler hangs when trying to debug Clojure project

Installed Eclipse-Kepler on a Windows 8 box. Clojure and Leiningen already installed. Installed Counterclockwise. Started up, created test Clojure project, ran without debugger, and ran successfully under debugger. Messed with it a bit more, was in and out of the debugger several times. After one debugging session got "an error" (yes, I know I should have written it down, but failed to do so. Take pity upon the soul of this poor sinner...). After that every debugging session I tried to start (using "Debug As...Clojure Application") failed to start, eventually timing out with a "Timed out waiting for REPL to start" error. Messed with it a while, uninstalled CCW, re-installed CCW - no change, REPL still refused to start under the debugger. Could always start a REPL by "sending" the text of the project file to the REPL using Ctrl-Alt-S. Finally deleted all of Kepler, re-installed, re-installed CCW, and could then debug again.
My questions: has anyone else encountered this, and is there a better workaround than blowing away the entire Eclipse install and re-extracting from the .zip? I did do a check for updated versions of anything and nothing came up. Is this a Kepler issue, i.e. might this be more stable under Juno?

Eclipse shortcut for minimize / expand method has stopped working

I'm using the shortcuts to expand / minimize methods quite a lot. For some reason all of these have suddenly (after starting Eclipse this morning) stopped working, and I'm a bit dumbfounded as to why. All other shortcuts (at least that I know of, and have tested) work just fine.
I've attempted to restart Eclipse and checked the error logs (nothing there).
Running latest (stable, not RC) Eclipse Juno on Ubuntu 12.04.
Turns outs it was a very simple (and stupid) fix: I had accidentally hit CTRL + numpad_Divide, this toggles "Folding" which in turn determines if it's possible to expand / minimize methods.

eclipse stop unintended debug

I have a tomcat servlet project, which is normally running in eclipse, except of one line, which always stops the debugger without of a breakpoint. If I manually proceed debugging by pressing 2resume", all will work fine.
Is there any directive/annotation to prevent stopping the debugger on lines without breakpoints?
Clean and build ur project...i have faced similar issues...it got resolved after a full clean and build was done.