void (DataContext dataContext) { final Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return; StackFrameDescriptorImpl stackFrameDescriptor = getStackFrameDescriptor(dataContext); XDebugSession session = XDebugSession.DATA_KEY.getData(dataContext); if (stackFrameDescriptor != null && session != null) { StackFrameProxyImpl frameProxy = stackFrameDescriptor.getFrameProxy(); DebugProcessImpl process = (DebugProcessImpl)stackFrameDescriptor.getDebugProcess(); process.getManagerThread().schedule(new SuspendContextCommandImpl((SuspendContextImpl)session.getSuspendContext()) { @Override public void contextAction(@NotNull SuspendContextImpl suspendContext) { ThreadReferenceProxyImpl threadProxy = frameProxy.threadProxy(); SuspendContextImpl threadSuspendContext = SuspendManagerUtil.findContextByThread(process.getSuspendManager(), threadProxy); JavaExecutionStack executionStack = new JavaExecutionStack(threadProxy, process, Objects.equals(threadSuspendContext.getThread(), threadProxy)); executionStack.initTopFrame(); boolean threadChanged = false; if (session instanceof XDebugSessionImpl) { if (!Objects.equals(((XDebugSessionImpl)session).getCurrentExecutionStack(), executionStack)) { threadChanged = true; XDebuggerActionsCollector.threadSelected.log(XDebuggerActionsCollector.PLACE_THREADS_VIEW); } } XStackFrame frame = ContainerUtil.getFirstItem(executionStack.createStackFrames(frameProxy)); if (frame != null) { if (!threadChanged) { XDebuggerActionsCollector.frameSelected.log(XDebuggerActionsCollector.PLACE_THREADS_VIEW); } DebuggerUIUtil.invokeLater(() -> session.setCurrentStackFrame(executionStack, frame)); } } }); } }