}
public boolean setSteppingThrough(ThreadReferenceProxyImpl threadProxy) {
- return mySteppingThroughThreads.add(threadProxy);
+ if (threadProxy != null) {
+ return mySteppingThroughThreads.add(threadProxy);
+ }
+ return false;
}
@NotNull
public void stepOut(int stepSize) {
final SuspendContextImpl suspendContext = getSuspendContext();
final DebugProcessImpl.ResumeCommand cmd = myDebugProcess.createStepOutCommand(suspendContext, stepSize);
- mySteppingThroughThreads.add(cmd.getContextThread());
+ setSteppingThrough(cmd.getContextThread());
resumeAction(cmd, EVENT_STEP);
}
public void stepOver(boolean ignoreBreakpoints, int stepSize) {
final SuspendContextImpl suspendContext = getSuspendContext();
final DebugProcessImpl.ResumeCommand cmd = myDebugProcess.createStepOverCommand(suspendContext, ignoreBreakpoints, stepSize);
- mySteppingThroughThreads.add(cmd.getContextThread());
+ setSteppingThrough(cmd.getContextThread());
resumeAction(cmd, EVENT_STEP);
}
public void stepInto(final boolean ignoreFilters, final @Nullable MethodFilter smartStepFilter, int stepSize) {
final SuspendContextImpl suspendContext = getSuspendContext();
final DebugProcessImpl.ResumeCommand cmd = myDebugProcess.createStepIntoCommand(suspendContext, ignoreFilters, smartStepFilter, stepSize);
- mySteppingThroughThreads.add(cmd.getContextThread());
+ setSteppingThrough(cmd.getContextThread());
resumeAction(cmd, EVENT_STEP);
}
public void runToCursor(@NotNull XSourcePosition position, final boolean ignoreBreakpoints) {
try {
DebugProcessImpl.ResumeCommand runToCursorCommand = myDebugProcess.createRunToCursorCommand(getSuspendContext(), position, ignoreBreakpoints);
- mySteppingThroughThreads.add(runToCursorCommand.getContextThread());
+ setSteppingThrough(runToCursorCommand.getContextThread());
resumeAction(runToCursorCommand, EVENT_STEP);
}
catch (EvaluateException e) {
/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package com.intellij.debugger.engine;
import com.intellij.debugger.engine.jdi.ThreadReferenceProxy;
+import org.jetbrains.annotations.Nullable;
public interface SuspendContext extends StackFrameContext {
int getSuspendPolicy();
+ @Nullable
ThreadReferenceProxy getThread();
}