Search in sources :

Example 56 with DebugProcessImpl

use of com.intellij.debugger.engine.DebugProcessImpl 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

DebugProcessImpl (com.intellij.debugger.engine.DebugProcessImpl)56 DebuggerContextImpl (com.intellij.debugger.impl.DebuggerContextImpl)20 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)15 Project (com.intellij.openapi.project.Project)15 Nullable (org.jetbrains.annotations.Nullable)12 DebuggerCommandImpl (com.intellij.debugger.engine.events.DebuggerCommandImpl)9 DebuggerTreeNodeImpl (com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl)9 DebuggerContextCommandImpl (com.intellij.debugger.engine.events.DebuggerContextCommandImpl)7 List (java.util.List)7 SourcePosition (com.intellij.debugger.SourcePosition)5 JavaValue (com.intellij.debugger.engine.JavaValue)5 DebuggerSession (com.intellij.debugger.impl.DebuggerSession)5 StackFrameProxyImpl (com.intellij.debugger.jdi.StackFrameProxyImpl)5 ThreadReferenceProxyImpl (com.intellij.debugger.jdi.ThreadReferenceProxyImpl)5 VirtualMachineProxyImpl (com.intellij.debugger.jdi.VirtualMachineProxyImpl)5 XDebugSession (com.intellij.xdebugger.XDebugSession)5 NotNull (org.jetbrains.annotations.NotNull)5 NodeDescriptorImpl (com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl)4 ThreadDescriptorImpl (com.intellij.debugger.ui.impl.watch.ThreadDescriptorImpl)4 ArrayList (java.util.ArrayList)4