@NotNull
  public static List<StackFrameItem> createFrames(@NotNull SuspendContextImpl suspendContext, boolean withVars) throws EvaluateException {
    ThreadReferenceProxyImpl threadReferenceProxy = suspendContext.getThread();
    if (threadReferenceProxy != null) {
      List<StackFrameProxyImpl> frameProxies = threadReferenceProxy.forceFrames();
      List<StackFrameItem> res = new ArrayList<>(frameProxies.size());
      for (StackFrameProxyImpl frame : frameProxies) {
        try {
          List<XNamedValue> vars = null;
          Location location = frame.location();
          if (withVars) {
            if (!DebuggerSettings.getInstance().CAPTURE_VARIABLES) {
              vars = VARS_CAPTURE_DISABLED;
            }
            else {
              Method method = location.method();
              if (method.isNative() || method.isBridge() || DebuggerUtils.isSynthetic(method)) {
                vars = VARS_NOT_CAPTURED;
              }
              else {
                vars = new ArrayList<>();

                try {
                  ObjectReference thisObject = frame.thisObject();
                  if (thisObject != null) {
                    vars.add(createVariable(thisObject, "this", VariableItem.VarType.OBJECT));
                  }
                }
                catch (EvaluateException e) {
                  LOG.debug(e);
                }

                try {
                  for (LocalVariableProxyImpl v : frame.visibleVariables()) {
                    try {
                      VariableItem.VarType varType =
                        v.getVariable().isArgument() ? VariableItem.VarType.PARAM : VariableItem.VarType.OBJECT;
                      vars.add(createVariable(frame.getValue(v), v.name(), varType));
                    }
                    catch (EvaluateException e) {
                      LOG.debug(e);
                    }
                  }
                }
                catch (EvaluateException e) {
                  if (e.getCause() instanceof AbsentInformationException) {
                    vars.add(JavaStackFrame.LOCAL_VARIABLES_INFO_UNAVAILABLE_MESSAGE_NODE);
                    // only args for frames w/o debug info for now
                    try {
                      for (Map.Entry<DecompiledLocalVariable, Value> entry : LocalVariablesUtil
                        .fetchValues(frame, suspendContext.getDebugProcess(), false).entrySet()) {
                        vars.add(createVariable(entry.getValue(), entry.getKey().getDisplayName(), VariableItem.VarType.PARAM));
                      }
                    }
                    catch (Exception ex) {
                      LOG.info(ex);
                    }
                  }
                  else {
                    LOG.debug(e);
                  }
                }
              }
            }
          }

          StackFrameItem frameItem = new StackFrameItem(location, vars);
          res.add(frameItem);

          List<StackFrameItem> relatedStack = StackCapturingLineBreakpoint.getRelatedStack(frame, suspendContext);
          if (!ContainerUtil.isEmpty(relatedStack)) {
            res.add(null); // separator
            res.addAll(relatedStack);
            break;
          }
        }
        catch (EvaluateException e) {
          LOG.debug(e);
        }
      }
      return res;
    }
    return Collections.emptyList();
  }
@NotNull
  public static List<StackFrameItem> createFrames(@NotNull SuspendContextImpl suspendContext, boolean withVars)