void (@NotNull SuspendContextImpl suspendContext) { List<SuspendContextImpl> pausedContexts = process.getSuspendManager().getPausedContexts(); if (pausedContexts.size() > 1) { int currentIndex = pausedContexts.indexOf(debuggerContext.getSuspendContext()); int newIndex = (currentIndex + 1) % pausedContexts.size(); process.getManagerThread().schedule(new SuspendContextCommandImpl(pausedContexts.get(newIndex)) { @Override public void contextAction(@NotNull SuspendContextImpl suspendContext) { DebuggerSession.switchContext(suspendContext); } }); } }