Trouble debugging Java in Eclipse Galileo - appears to be in infinite loop - java

The user is on JDK6 u 18 with the latest Eclipse, and there appears to be an issue where Eclipse can't step through the debugger as it would normally. Instead, the debugger is rapidly listing and delisting threads from what it looks like at the very bottom of the debug tree.
Has anyone seen this before?

At least check with
other version of Eclipse
other JDK/SDK
first, to see how Eclipse and the JVM react to the program in the debugger.
What does "can't step through the debugger" mean? It hangs, it is slow, the refresh of the thread list is annoying...? Is your program rapidly creating and destroying thousands of threads?

Related

Eclipse permanently not responding while debugging

I was wondering if anyone has experienced this problem.
We work with Eclipse 2020-03 running Wildfly 16 and OpenJDK 1.12 on a Windows 10 Desktop connecting the a local instance of SQL Server. When the app server is deployed we connect using Chrome or IE. When I'm debugging the java app, Eclipse becomes unresponsive. It could go 2 or 3 days before this happens and then happen 10 times back to back. It is inconsistent and I cannot determine what I might being doing to cause the issue. I have worked with older versions of Eclipse and have not had this issue till the Luna version. Of course at the same time we moved to Maven and GIT as well.
Some of symptoms
1. Hang when stepping through code.
2. Hang when click away after stopped at a breakpoint and then coming back.
3. Hang when inspecting variables.
4. Hang when increase the display area of one of the variables when its a long String.
If I just run and do not interact with the debug perspective, I have no issue and it never hangs.
Funny thing is we have at least a hundred developers running with this setup and only 2 or 3 of us have had this problem. At least from what I have tried to gather in terms of information.
Things I've tried
1. Complete format and re-install of PC. (I was desparate)
2. Upgraded Eclipse from 2019-03.
3. Based on google searches, turned off mylyn
4. Logged a comment on a issue with Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=322126
5. Reviewed Eclipse, Wildfly and Java logs. Nothing of note.
6. Changes startup parameters of Eclipse with no luck.
7. A few other things I cannot remember.
To recover, I have to terminate the Eclipse process and the terminate the OpenJDK process.
Any help would be appreciated.

Intellij debugger suspends before hitting any breakpoints

I'm debugging a remote Java application using Intellij. I have defined several breakpoints, but Intellij suspends my application before hitting any of them. When I click 'Resume program', it continues to another arbitrary point that I did not mark. I have to do this several times until I finally get to the code I'm interested in. All of these unwanted pauses happen in library files. Is there a way to get Intellij to stop pausing at these places?

Finding location of excecution at any moment

I'm currently working on developing a program in Netbeans. Unfortunately, my program tends to freeze a lot, however I'm having trouble figuring out where the issue is. What I would like to do is simply have the debugger highlight the currently executing line inside my code (not inside libraries). Basically stop the code at any point without using a breakpoint. Is there any way to do this in the Netbeans IDE?
Alternately, is there anyway for me to cause a break point to activate (and so show a workable stacktrace) whenever one of my lines of code doesn't move on for a certain period of time?
Profiling does work to some extent, however, it doesn't let me examine variables or get a definitive stack trace.
I am writing this program in Java and I'm using the Java SE version of Netbeans 8.0.2.
Most IDEs (Eclipse, IntelliJ which I use) have an option to pause all threads in a program. Look under the debug menus probably in the same place things like step into, step out of etc reside. A quick Google search on Netbeans IDE says there should be an option under that menu named "pause" that will do what you want.
It will pause all threads of execution in your program. You will be able to examine the stack of each thread and from there should should be able to figure out where your code is hanging.

IntelliJ IDEA freezing on source code completion

I'm using IntelliJ IDEA 10.0 for Java development. A few days ago it started to reveal a strange behavior with auto-completion: pop-ups with completion options appears as usual,
but IDEA completely freezes after choosing an option.
Cache cleaning doesn't help.
Has anyone else encountered this?
Update: Another symptom: IDEA freezes when trying to auto-implement method (e.g. toString)
This is may be due to garbage collector working hard.
Try give your IDE more memory. You can do it in idea.exe.vmoptions(if you use windows). Increase -xmx property to at least 512 MB.
This may not be the same issue you describe, but I have experienced long (but not eternal) freezes, where after a minute or two it came back to respond. This happened whenever I pressed Ctrl+Alt+Space in the code completion popup, which caused IDEA to load all project and external libraries to browse for possible completion options.

Helios Eclipse java debugger on Windows is very slow to highlight source code

I have Eclipse Helios SR1 installed on Windows XP. I am writing/debugging Java code using JDK 1.6.
When I debug and I hit a breakpoint, Eclipse is fast to show me the stacktrace. (See #1 in attached image.)
However, the source code line highlight (light green, see #2 in attached image) is very slow to appear. Oddly, when I first installed Eclipse, this was very fast. Now it is very slow. It takes about 15 seconds to highlight as light green.
Any ideas what is wrong with my Eclipse install/config?
FYI: Very fast processor + 4GB of RAM. Plenty of disk space. I have tried a "Hello, World" test Java project. Just a few lines of code... still the same issue when hitting a vanilla breakpoint.
According to running-a-program-in-debug-mode-is-incredible-slow I succeeded with running
eclipse -clean
(test this before you setup a new workspace)
This is surely not an Eclipse problem. If it is highlighting, means its working.
There must be something wrong with the Windows. More RAM does not mean necessarily fast processing. Check Task Manager, and try to monitor processes, especially the java one. There can be multiple
java processes, kill unnecessary ones.
If the laptop using some sort of disk encryption, then this is surely possible.
If your anti-virus is hogging the CPU, quite possible.
Or else you can do one more thing is that everyday you can manually clean your project and you can also set the console limit to unlimited.
The answer is simple: Create a new workspace.
I did it and now my debugger is super-fast again.

Categories

Resources