Debugging - Step Over woes

Answered

I've been patient with this for a long time now... but my patience is
wearing thin.

I am of course talking about the F8 'Russian Roulette'.  You press F8 to
step over a statement in the debugger, and then you keep your fingers
crossed that stepping returns promptly and you can continue to debug...
and aren't just sitting there for minutes with a frozen application...
if you don't get fed up waiting and just kill it that is.

I don't know if it's due to a change to the JVM or a change in IDEA, but
I do know it didn't used to be like this, and I can't see that such a
regression would be in the JVM would it?  Does anyone else regularly run
into this too? Any tips for avoiding it?

When it first happened many moons ago I thought it was just an EAP issue
and that it would be ironed out, but I still get it this far down the
line, so I'm assuming it must be more complicated.

N.

12 comments

Hi Natan,
Please provide more information about your case: what kind of application you are debugging, what are JDK versions, debugger settings, which breakpoints are active etc.
While in general stepping is slower than "breakpoint + resume", it is not that slow as you describe (at least for me).

0

Usually the debugger gets slow because somebody misclicked and created a method breakpoint wich are horribly slow (on the sun jvm at least).
Get sure you use no special feature of the debugger.

0

Eugene Zhuravlev wrote:

Hi Natan,
Please provide more information about your case: what kind of application you are debugging, what are JDK versions, debugger settings, which breakpoints are active etc.
While in general stepping is slower than "breakpoint + resume", it is not that slow as you describe (at least for me).

---
Original message URL: http://www.jetbrains.net/devnet/message/5259910#5259910

Hi Eugene,

Ok, the application is a straight fat client, and most of my work is in
the UI part so it's usually in the depths of that.  We currently use JDK
1.6.0_17 but I've seen this problem since many JDK versions now, and I'm
sure it was there in 1.5.
I have no special breakpoints set, just vanilla ones, no method ones
etc.  A few Exception breakpoints, and then a few line breakpoints
around the code I'm executing.  Suspend policy is all.
Debugger is socket transport. 4-5 Data type renderers defined, nothing
too complex.
Pretty well everything is set default otherwise.

As I say it's a bit of a roulette when this happens, but it's usually
when stepping over a call that I know is 'involved' i.e. has a
relatively complex method path behind it, not just a simple getter or
something.

Hope this helps,
Nathan.

0

Nathan Brown wrote:

Eugene Zhuravlev wrote:

>> Hi Natan, Please provide more information about your case: what kind
>> of application you are debugging, what are JDK versions, debugger
>> settings, which breakpoints are active etc.
>> While in general stepping is slower than "breakpoint + resume", it is
>> not that slow as you describe (at least for me).

As I say it's a bit of a roulette when this happens, but it's usually
when stepping over a call that I know is 'involved' i.e. has a
relatively complex method path behind it, not just a simple getter or
something.

Hope this helps,
Nathan.


Hi Eugene,

I've got a bit more input on this problem for you... I just had a
situation where the "Step Over" just simply didn't return, in the end I
had to quite the app and start again.  But before I did this, I clicked
pause/resume a few times to see what's going on... well it did seem to
be running, just really slowly.  The execution had gone into some JAXB
code, which is pretty IO intensive, and when I paused it each time it
was somewhere inside there... so it seems that maybe io intensive code
isn't running well during a step over.  I'm not sure if this is IDEA
causing this of course, but I'm just thinking maybe the parameters given
to the debug interface are causing problems?
Anyway, just a bit more information for you on this ongoing issue.
Please let me know if there's anything you'd like me to try or if there
is a youtrack issue you'd like me to update.

Thanks,
Nathan.

0

On Fri, 23 Apr 2010 10:41:38 +0100, Nathan Brown wrote:

Nathan Brown wrote:

>

I've got a bit more input on this problem for you...

                              so it seems that maybe io intensive code
isn't running well during a step over.


I think you're onto something there.  I've seen a significant slowdown in
some "stepovers" lately too, and one example in my case is using Apache
POI to open an Excel workbook (from a .xls FileInputStream i.e. with file
I/O happening).

--
Mark Scott
mark@codebrewer.com

0

Hi Natan,
As lacroix1547 mentioned below, please check carefully your settings (or just send me your iws file for examination). For example, very slow stepping may be caused by "Watch method return values" feature. The corresponding button is located on the "Variables" pane's toolbar.

0

Eugene Zhuravlev wrote:

Hi Natan,
As /people/lacroix1547 mentioned below, please check carefully your settings (or just send me your iws file for examination). For example, very slow stepping may be caused by "Watch method return values" feature. The corresponding button is located on the "Variables" pane's toolbar.

---
Original message URL: http://www.jetbrains.net/devnet/message/5261736#5261736

Thanks Eugene.  That option was selected (although I don't remember
doing it, is it on by default?) I'll forward my IWS file anyway, and
I'll see how things perform with that option deselected.

Cheers,
Nathan.

0

I have been having the same issue.  If I put a breakpoint on the next line and F9/Resume Program, it'll go to that breakpoint immedialty.  Using F8/Step Over, I frequently wait several minutes before it gets to the next line.  I've seen the same behavior with 32 bit JVM 1.6.0_12 and 64 bit JVM 1.6.0_15

0

Kurtis Walker wrote:

I have been having the same issue.  If I put a breakpoint on the next line and F9/Resume Program, it'll go to that breakpoint immedialty.  Using F8/Step Over, I frequently wait several minutes before it gets to the next line.  I've seen the same behavior with 32 bit JVM 1.6.0_12 and 64 bit JVM 1.6.0_15

---
Original message URL: http://www.jetbrains.net/devnet/message/5262699#5262699

Do you have the "Watch method return values" option selected? Since
turning it off I haven't seen the problem again...

N.

0

Don't know how I missed that in the previous post.  That fixes it.  Thanks.


0

I am having this same exact problem even with "Watch method return values" turned off in version 2018.3. If I use breakpoints, I'm OK. If I use "step over" it is extremely slow or gets stuck (mostly in JAXB heavy code). 

0

@Raffy, I am not sure its the same problem, last posting here was done in 2010. Could you please raise a separate ticket at https://youtrack.jetbrains.com/issues

0

Post is closed for comments.