@Nullable
  public static List<StackFrameItem> getAgentRelatedStack(@NotNull StackFrameProxyImpl frame, @NotNull SuspendContextImpl suspendContext) {
    if (!isAgentEnabled() || !frame.threadProxy().equals(suspendContext.getThread())) { // only for the current thread for now
      return null;
    }
    try {
      Method method = DebuggerUtilsEx.getMethod(frame.location());
      // TODO: use com.intellij.rt.debugger.agent.CaptureStorage.GENERATED_INSERT_METHOD_POSTFIX
      if (method != null && method.name().endsWith("$$$capture")) {
        return getProcessCapturedStack(new EvaluationContextImpl(suspendContext, frame));
      }
    }
    catch (EvaluateException e) {
      ObjectReference targetException = e.getExceptionFromTargetVM();
      if (e.getCause() instanceof IncompatibleThreadStateException) {
        LOG.warn(e);
      }
      else if (targetException != null && DebuggerUtils.instanceOf(targetException.type(), "java.lang.StackOverflowError")) {
        LOG.warn(e);
      }
      else {
        LOG.error(e);
      }
    }
    return null;
  }
@Nullable
  public static List<StackFrameItem> getAgentRelatedStack(@NotNull StackFrameProxyImpl frame, @NotNull SuspendContextImpl suspendContext)