From 7e98900aee0aae82cd91d48946e6595377540396 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 27 Oct 2011 19:47:33 +0200 Subject: [PATCH] 'step into': stop stepping when we stop in the frame that is upper in the stack than the frame we started with. --- .../com/intellij/debugger/engine/RequestHint.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/RequestHint.java b/java/debugger/impl/src/com/intellij/debugger/engine/RequestHint.java index aae460a44774..08bafc3e50cd 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/RequestHint.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/RequestHint.java @@ -206,9 +206,15 @@ public class RequestHint { return myDepth; } if (myDepth == StepRequest.STEP_INTO) { - // check if we are still at the line from which the stepping begun - if (filesEqual && myFrameCount == frameCount && myPosition.getLine() != locationPosition.getLine()) { - return STOP; + if (filesEqual) { + // we are actually one or more frames upper than the original frame, should stop + if (myFrameCount > frameCount) { + return STOP; + } + // check if we are still at the line from which the stepping begun + if (myFrameCount == frameCount && myPosition.getLine() != locationPosition.getLine()) { + return STOP; + } } } return null; @@ -218,7 +224,7 @@ public class RequestHint { return resultDepth.intValue(); } } - // the rest of the code makes sence for depth == STEP_INTO only + // the rest of the code makes sense for depth == STEP_INTO only if (myDepth == StepRequest.STEP_INTO) { final DebuggerSettings settings = DebuggerSettings.getInstance();