f actions/pause
 * @static
 */
function selectFrame(cx, frame) {
  return async ({
    dispatch,
    client,
    getState,
    sourceMaps
  }) => {
    (0, _assert.default)(cx.thread == frame.thread, "Thread mismatch"); // Frames that aren't on-stack do not support evalling and may not
    // have live inspectable scopes, so we do not allow selecting them.

    if (frame.state !== "on-stack") {
      return dispatch((0, _sources.selectLocation)(cx, frame.location));
    }

    dispatch({
      type: "SELECT_FRAME",
      cx,
      thread: cx.thread,
      frame
    }); // It's important that we wait for selectLocation to finish because
    // we rely on the source being loaded and symbols fetched below.

    await dispatch((0, _sources.selectLocation)(cx, frame.location));
    dispatch((0, _expressions.evaluateExpressions)(cx));
    dispatch((0, _fetchScopes.fetchScopes)(cx));
  };
}PK