void (boolean state) { myDebugProcess.getManagerThread().schedule(PrioritizedTask.Priority.HIGH, () -> { DebuggerContextImpl debuggerContext = myDebugProcess.getDebuggerContext(); ThreadReferenceProxyImpl threadProxy = debuggerContext.getThreadProxy(); if (state) { StackFrameProxyImpl frame = debuggerContext.getFrameProxy(); if (frame != null && threadProxy != null) { start(threadProxy.getThreadReference(), frame.getIndexFromBottom()); } } else { if (threadProxy != null) { stop(threadProxy.getThreadReference()); } else { stopAll(); } } }); }