boolean (@NotNull SuspendContextCommandImpl action, LocatableEvent event) { SuspendContextImpl suspendContext = action.getSuspendContext(); if (suspendContext != null) { ThreadReferenceProxyImpl thread = suspendContext.getThread(); if (thread != null) { DebugProcessImpl process = suspendContext.getDebugProcess(); try { StackFrameProxyImpl frameProxy = ContainerUtil.getFirstItem(thread.forceFrames()); if (frameProxy != null) { Map<Object, List<StackFrameItem>> stacks = process.getUserData(CAPTURED_STACKS); if (stacks == null) { stacks = new FixedHashMap<>(MAX_STORED_STACKS); AsyncStacksUtils.putProcessUserData(CAPTURED_STACKS, Collections.synchronizedMap(stacks), process); } Value key = myCaptureEvaluator.evaluate(new EvaluationContextImpl(suspendContext, frameProxy)); if (key instanceof ObjectReference) { List<StackFrameItem> frames = StackFrameItem.createFrames(suspendContext, true); frames = ContainerUtil.getFirstItems(frames, AsyncStacksUtils.getMaxStackLength()); stacks.put(getKey((ObjectReference)key), frames); } } } catch (EvaluateException e) { LOG.debug(e); process.printToConsole(JavaDebuggerBundle.message("error.unable.to.evaluate.capture.expression", e.getMessage()) + "\n"); } } } return false; }