public static String getCapturedStackForThread()

in src/main/java/com/intellij/rt/debugger/agent/CaptureStorage.java [425:431]


  public static String getCapturedStackForThread(int limit, Thread thread) {
    Deque<CapturedStack> capturedStacks = storeAsyncStackTracesForAllThreads
            ? THREAD_TO_STACKS_MAP.get(thread)
            : (thread == Thread.currentThread() ? CURRENT_STACKS.get() : null);
    if (capturedStacks == null) return null;
    return wrapInString(capturedStacks.peekLast(), limit);
  }