[debugger] Fix command managing in tests

GitOrigin-RevId: 82be73e436525cd1458b32d5fa1b9ce4d4dcd09a
This commit is contained in:
Alexey Merkulov
2024-05-28 15:56:23 +02:00
committed by intellij-monorepo-bot
parent 998588a168
commit 9b8b6328e3
3 changed files with 19 additions and 10 deletions

View File

@@ -577,6 +577,17 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
@Override
public void paused(SuspendContextImpl suspendContext) {
// Need to add SuspendContextCommandImpl because the stepping pause is not now in SuspendContextCommandImpl
DebuggerManagerThreadImpl debuggerManagerThread = Objects.requireNonNull(suspendContext.getDebugProcess()).getManagerThread();
debuggerManagerThread.schedule(new SuspendContextCommandImpl(suspendContext) {
@Override
public void contextAction(@NotNull SuspendContextImpl suspendContext) {
pausedImpl(suspendContext);
}
});
}
private void pausedImpl(SuspendContextImpl suspendContext) {
try {
if (myScriptRunnables.isEmpty() && myRepeatingRunnables.isEmpty()) {
print("resuming ", ProcessOutputTypes.SYSTEM);