package com.jetbrains.javascript.debugger;

import org.jetbrains.annotations.Nullable;

/**
 * An object that matches the execution state of the JavaScript VM while
 * suspended. It reconstructs and provides access to the current state of the
 * JavaScript VM.
 */
public interface SuspendContext {
  SuspendState getState();

  @Nullable("if no frames (paused by user)")
  Script getScript();

  /**
   * @return the current exception state, or {@code null} if current state is
   *         not {@code EXCEPTION}
   * @see #getState()
   */
  @Nullable
  ExceptionData getExceptionData();

  @Nullable
  CallFrame getTopFrame();

  /**
   * @return a list of call frames for the current JavaScript suspended state (from the
   * innermost (top) frame to the main (bottom) frame)
   */
  AsyncResult<CallFrame[]> getCallFrames();

  /**
   * @return a set of the breakpoints hit on VM suspension with which this
   *         context is associated. An empty collection if the suspension was
   *         not related to hitting breakpoints (e.g. a step end)
   */
  List<Breakpoint> getBreakpointsHit();

  /**
   * @return evaluate context for evaluating expressions in global scope
   */
  EvaluateContext getGlobalEvaluateContext();

  /**
   * @return value mapping that all values have by default; typically unique for a particular
   *     {@link SuspendContext}
   */
  ValueLoader<?> getValueLoader();
}

@@ -37,16 +37,62 @@
 ugger;%0A%0A
+import com.intellij.openapi.util.AsyncResult;%0A
 import o
@@ -127,16 +127,40 @@
 lable;%0A%0A
+import java.util.List;%0A%0A
 /**%0A * A

move js debugger platform up