Intellij debugger suspends before hitting any breakpoints - java

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?

Related

why IntelliJ debbuging slows my entire system?

I'm using IntelliJ IDE (2021.2.3 community) in a java project and I am not able to utilize the debug because whenever I run and it hits a breakpoint it slows my mouse and keyboard, mainly the mouse and it becomes impossible to do anything other than struggle to end the process. That's very weird, I looked into the process manager during the issue and my system looked ok on cpu and memory

IntelliJ Idea remote debugger hangs

When I use remote debugger in IntelliJ to debug a Java application on server, it stops on breakpoints successfully but when I try to evaluate any expressions or variables it hangs and shows nothing (usually with "collecting data" message). From that point I can't even continue stepping through code anymore. I have to click resume so it at least runs, but it will never stop at other breakpoints too until I restart the debug session and usually even the Java application being debugged.
I can step through the code after stopping on breakpoint, also I see the variables in the debugger panel, it only starts to behave weirdly when I try to evaluate an expression or add a watcher. Then it stops working and restart of the debugger and the app is needed.
Did anybody experience something similar? Is it IntelliJ or server problem?
(sorry this is so vaguely described, but I have no idea what to share or what the problem might be)
Expression evaluation during remote debug need more data to be sync then the other operations ( breakpoints add/remove, step managements ecc ).
So this kind of issue should be just related to:
a slow connection
an huge complexity and amount of data involved into the operation to execute in the remote server

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 slows down entire computer when a breakpoint is hit

I am using IntelliJ IDEA 12.1.6 on (64-bit) Windows 7 Enterprise (I've also seen this same problem with IDEA 11, though not as often). I am running it under Java 7 (1.7.45).
When I run a program in the IDE, under the debugger (local debugging), everything is fine until I hit a breakpoint (these are plain old on-a-specific-line breakpoints, not method breakpoints or exception breakpoints). Once the breakpoint is hit, virtually all the time (though not always) my entire machine slows to a near halt. All keyboard operations (not just in IDEA) slow way down (they eventually do get processed so the events are buffered, not lost). Same for window operations (drag, minimize, raise, lower). Once the program resumes from the breakpoint everything goes completely back to normal until the next time a breakpoint is hit.
This is obviously really annoying as it makes debugging essentially impossible.
I've had Task Manager up and don't see anything strange. The CPU is not pegged, memory isn't maxed out, etc. My hard drive light isn't on.
Any ideas on what's going on and (more importantly) how to fix it?
It's hard to say what the problem is, but here are some things that might help:
Invalidate caches as described here--though be aware of the consequences.
Make sure you have only enabled those plugins you are actually using or likely to use.
Try to find if all breakpoints have the same problem or if, for example, you only have issues with Java breakpoints but not JavaScript ones. If that happens, it could give you a clue.
Well, it looks like my specific problem is IE-related.
The program I am debugging is the server-side of a webapp. (Sadly it is IE-only due to some weird stuff in the Ajax it is using -- I'm not responsible for that).
I have been setting my breakpoints, running the server under the debugger, and then doing stuff with the webapp in IE, which ultimately causes breakpoints to be hit. When a breakpoint is hit and I am single-stepping, everything remains OK if I do not use the keyboard at all. If I click on the various single-step icons or select the single-step actions via mouse from IDEA's "Run" menu everything keeps working. But the moment I use F8 to single-step, or hit a key in any other problem (like in a mail program) the freeze happens.
It finally occurred to me (shame on me) to run IE on another computer while running the server in the IDEA debugger on my main computer. When I do that, everything is fine and I can use the keyboard in any application, as much as I want to, and the freeze does not happen.
So the problem seems to be IE causing weirdness when it has sent a request and is waiting for a response from the server. Still, there does seem to be some interaction with IDEA because when I run IE on a separate computer and hit a breakpoint on my computer, I can use the keyboard all I want on the computer where I am running IE without any problems at all.

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

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?

Categories

Resources