mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] Make it possible to set several stepping breakpoints
GitOrigin-RevId: 46bc117413907efeea3bb8a71f1df114e66f24e3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f911c11040
commit
cfdb1f116e
@@ -509,7 +509,7 @@ public class DebugProcessEvents extends DebugProcessImpl {
|
||||
if (event == null || vm == event.virtualMachine()) {
|
||||
try {
|
||||
preprocessEvent(suspendContext, null);
|
||||
cancelRunToCursorBreakpoint();
|
||||
cancelSteppingBreakpoints();
|
||||
}
|
||||
finally {
|
||||
DebuggerEventThread eventThread = myEventThreads.get(vm);
|
||||
|
||||
@@ -918,22 +918,23 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
myPositionManager.appendPositionManager(positionManager);
|
||||
}
|
||||
|
||||
private volatile SteppingBreakpoint mySteppingBreakpoint;
|
||||
private final List<SteppingBreakpoint> mySteppingBreakpoints = new ArrayList<>();
|
||||
|
||||
public void setSteppingBreakpoint(@Nullable SteppingBreakpoint breakpoint) {
|
||||
mySteppingBreakpoint = breakpoint;
|
||||
public void setSteppingBreakpoint(@NotNull SteppingBreakpoint breakpoint) {
|
||||
mySteppingBreakpoints.add(breakpoint);
|
||||
}
|
||||
|
||||
public void cancelRunToCursorBreakpoint() {
|
||||
public void cancelSteppingBreakpoints() {
|
||||
DebuggerManagerThreadImpl.assertIsManagerThread();
|
||||
final SteppingBreakpoint runToCursorBreakpoint = mySteppingBreakpoint;
|
||||
if (runToCursorBreakpoint != null) {
|
||||
setSteppingBreakpoint(null);
|
||||
boolean isRestoreBreakpoints = false;
|
||||
for (SteppingBreakpoint runToCursorBreakpoint : mySteppingBreakpoints) {
|
||||
getRequestsManager().deleteRequest(runToCursorBreakpoint);
|
||||
if (runToCursorBreakpoint.isRestoreBreakpoints()) {
|
||||
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().enableBreakpoints(this);
|
||||
}
|
||||
isRestoreBreakpoints |= runToCursorBreakpoint.isRestoreBreakpoints();
|
||||
}
|
||||
if (isRestoreBreakpoints) {
|
||||
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().enableBreakpoints(this);
|
||||
}
|
||||
mySteppingBreakpoints.clear();
|
||||
}
|
||||
|
||||
public static void prepareAndSetSteppingBreakpoint(SuspendContextImpl context,
|
||||
@@ -2063,7 +2064,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
@Override
|
||||
public void contextAction(@NotNull SuspendContextImpl context) {
|
||||
showStatusText(JavaDebuggerBundle.message("status.run.to.cursor"));
|
||||
cancelRunToCursorBreakpoint();
|
||||
cancelSteppingBreakpoints();
|
||||
if (myRunToCursorBreakpoint == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
}
|
||||
else {
|
||||
LOG.debug("vote paused");
|
||||
myDebugProcess.cancelRunToCursorBreakpoint();
|
||||
myDebugProcess.cancelSteppingBreakpoints();
|
||||
if (!Registry.is("debugger.keep.step.requests")) {
|
||||
ThreadReferenceProxyImpl thread = suspendContext.getEventThread();
|
||||
myDebugProcess.deleteStepRequests(suspendContext.getVirtualMachineProxy().eventRequestManager(),
|
||||
|
||||
Reference in New Issue
Block a user