Search in sources :

Example 21 with StackFrameProxyImpl

use of com.intellij.debugger.jdi.StackFrameProxyImpl in project kotlin by JetBrains.

the class DebuggerSteppingHelper method createStepOverCommand.

public static DebugProcessImpl.ResumeCommand createStepOverCommand(final SuspendContextImpl suspendContext, final boolean ignoreBreakpoints, final KotlinSteppingCommandProvider.KotlinSourcePosition kotlinSourcePosition) {
    final DebugProcessImpl debugProcess = suspendContext.getDebugProcess();
    return debugProcess.new ResumeCommand(suspendContext) {

        @Override
        public void contextAction() {
            boolean isDexDebug = NoStrataPositionManagerHelperKt.isDexDebug(suspendContext.getDebugProcess());
            try {
                StackFrameProxyImpl frameProxy = suspendContext.getFrameProxy();
                if (frameProxy != null) {
                    Action action = KotlinSteppingCommandProviderKt.getStepOverAction(frameProxy.location(), kotlinSourcePosition, frameProxy, isDexDebug);
                    createStepRequest(suspendContext, getContextThread(), debugProcess.getVirtualMachineProxy().eventRequestManager(), StepRequest.STEP_LINE, StepRequest.STEP_OUT);
                    action.apply(debugProcess, suspendContext, ignoreBreakpoints);
                    return;
                }
                debugProcess.createStepOutCommand(suspendContext).contextAction();
            } catch (EvaluateException ignored) {
            }
        }
    };
}
Also used : StackFrameProxyImpl(com.intellij.debugger.jdi.StackFrameProxyImpl) EvaluateException(com.intellij.debugger.engine.evaluation.EvaluateException) DebugProcessImpl(com.intellij.debugger.engine.DebugProcessImpl)

Aggregations

StackFrameProxyImpl (com.intellij.debugger.jdi.StackFrameProxyImpl)21 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)14 Nullable (org.jetbrains.annotations.Nullable)6 SourcePosition (com.intellij.debugger.SourcePosition)5 DebugProcessImpl (com.intellij.debugger.engine.DebugProcessImpl)5 SuspendContextImpl (com.intellij.debugger.engine.SuspendContextImpl)4 DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)4 Project (com.intellij.openapi.project.Project)4 EvaluationContextImpl (com.intellij.debugger.engine.evaluation.EvaluationContextImpl)3 ExpressionEvaluator (com.intellij.debugger.engine.evaluation.expression.ExpressionEvaluator)3 Location (com.sun.jdi.Location)3 ObjectReference (com.sun.jdi.ObjectReference)3 DebuggerContextCommandImpl (com.intellij.debugger.engine.events.DebuggerContextCommandImpl)2 DebuggerUtilsEx (com.intellij.debugger.impl.DebuggerUtilsEx)2 ThreadReferenceProxyImpl (com.intellij.debugger.jdi.ThreadReferenceProxyImpl)2 Computable (com.intellij.openapi.util.Computable)2 com.intellij.psi (com.intellij.psi)2 PsiElement (com.intellij.psi.PsiElement)2 ThreeState (com.intellij.util.ThreeState)2 Method (com.sun.jdi.Method)2