lientEvaluated"
// "interrupted", "attached"
const reasons = {
  debuggerStatement: "whyPaused.debuggerStatement",
  breakpoint: "whyPaused.breakpoint",
  exception: "whyPaused.exception",
  resumeLimit: "whyPaused.resumeLimit",
  breakpointConditionThrown: "whyPaused.breakpointConditionThrown",
  eventBreakpoint: "whyPaused.eventBreakpoint",
  getWatchpoint: "whyPaused.getWatchpoint",
  setWatchpoint: "whyPaused.setWatchpoint",
  mutationBreakpoint: "whyPaused.mutationBreakpoint",
  interrupted: "whyPaused.interrupted",
  // V8
  DOM: "whyPaused.breakpoint",
  EventListener: "whyPaused.pauseOnDOMEvents",
  XHR: "whyPaused.XHR",
  promiseRejection: "whyPaused.promiseRejection",
  assert: "whyPaused.assert",
  debugCommand: "whyPaused.debugCommand",
  other: "whyPaused.other"
};

function getPauseReason(why) {
  if (!why) {
    return null;
  }

  const reasonType = why.type;

  if (!reasons[reasonType]) {
    console.log("Please file an issue: reasonType=", reasonType);
  }

  return reasons[reasonType];
}

function isException(why) {
  return (why === null || why === void 0 ? void 0 : why.type) === "exception";
}

function isInterrupted(why) {
  return (why === null || why === void 0 ? void 0 : why.type) === "interrupted";
}

function inDebuggerEval(why) {
  if (why && why.type === "exception" && why.exception && why.exception.preview && why.exception.preview.fileName) {
    return why.exception.preview.fileName === "debugger eval code";
  }

  return false;
}PK