diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java index faa295b2a05..94981ae8fa4 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/DebuggerSteppingHelper.java @@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.debugger.stepping; import com.intellij.debugger.engine.DebugProcessImpl; import com.intellij.debugger.engine.SuspendContextImpl; import com.intellij.debugger.engine.evaluation.EvaluateException; +import com.intellij.debugger.engine.events.SuspendContextCommandImpl; import com.intellij.debugger.impl.DebuggerUtilsEx; import com.intellij.debugger.jdi.StackFrameProxyImpl; import com.intellij.debugger.jdi.ThreadReferenceProxyImpl; @@ -37,6 +38,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.psi.KtFunctionLiteral; import org.jetbrains.kotlin.psi.KtNamedFunction; +import org.jetbrains.kotlin.utils.ExceptionUtilsKt; import java.util.ArrayList; import java.util.List; @@ -61,7 +63,7 @@ public class DebuggerSteppingHelper { kotlinSourcePosition ); - DebugProcessImpl.ResumeCommand command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); + SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); if (command != null) { createStepRequest( @@ -78,6 +80,9 @@ public class DebuggerSteppingHelper { } catch (EvaluateException ignored) { } + catch (Exception e) { + throw ExceptionUtilsKt.rethrow(e); + } } }; } @@ -102,7 +107,7 @@ public class DebuggerSteppingHelper { inlineArgument ); - DebugProcessImpl.ResumeCommand command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); + SuspendContextCommandImpl command = action.createCommand(debugProcess, suspendContext, ignoreBreakpoints); if (command != null) { createStepRequest( @@ -120,6 +125,9 @@ public class DebuggerSteppingHelper { catch (EvaluateException ignored) { } + catch (Exception e) { + throw ExceptionUtilsKt.rethrow(e); + } } }; } diff --git a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt index 66835f86e46..afdc56bdec7 100644 --- a/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt +++ b/idea/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingCommandProvider.kt @@ -20,6 +20,7 @@ import com.intellij.debugger.NoDataException import com.intellij.debugger.SourcePosition import com.intellij.debugger.engine.DebugProcessImpl import com.intellij.debugger.engine.SuspendContextImpl +import com.intellij.debugger.engine.events.SuspendContextCommandImpl import com.intellij.debugger.impl.DebuggerContextImpl import com.intellij.debugger.impl.JvmSteppingCommandProvider import com.intellij.psi.PsiElement @@ -331,7 +332,7 @@ sealed class Action(val position: XSourcePositionImpl?) { debugProcess: DebugProcessImpl, suspendContext: SuspendContextImpl, ignoreBreakpoints: Boolean - ): DebugProcessImpl.ResumeCommand? { + ): SuspendContextCommandImpl? { return when (this) { is Action.RUN_TO_CURSOR -> { runReadAction {