{"record":{"id":"fa2856dd03ce57d1","repo":"microsoft/playwright","slug":"debugger-is-not-paused","errorCode":null,"errorMessage":"Debugger is not paused","messagePattern":"Debugger is not paused","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/playwright-core/src/server/debugger.ts","lineNumber":96,"sourceCode":"    // (e.g. recorder action-point capture) have recorded their state.\n    context.instrumentation.addListener(this, context, { order: 'last' });\n    this._context.once(BrowserContext.Events.Close, () => {\n      this._context.instrumentation.removeListener(this);\n      if (this._apiCallsFlushTimer)\n        clearTimeout(this._apiCallsFlushTimer);\n    });\n  }\n\n  requestPause(progress: Progress) {\n    if (this.isPaused())\n      throw new Error('Debugger is already paused');\n    this.setPauseBeforeWaitingActions();\n    this.setPauseAt({ next: true });\n  }\n\n  doResume(progress: Progress) {\n    if (!this.isPaused())\n      throw new Error('Debugger is not paused');\n    this.resume();\n  }\n\n  next(progress: Progress) {\n    if (!this.isPaused())\n      throw new Error('Debugger is not paused');\n    this.setPauseBeforeWaitingActions();\n    this.setPauseAt({ next: true });\n    this.resume();\n  }\n\n  runTo(progress: Progress, location: { file: string, line?: number, column?: number }) {\n    if (!this.isPaused())\n      throw new Error('Debugger is not paused');\n    this.setPauseBeforeWaitingActions();\n    this.setPauseAt({ location });\n    this.resume();\n  }","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/debugger.ts#L78-L114","documentation":"Thrown by Debugger.doResume (debugger.ts:96) when isPaused() is false. Resume is only valid against an active pause; calling it when the debugger is running has no work to do and is treated as a sequencing error.","triggerScenarios":"Calling resume() without a preceding pause; resuming after the page already auto-resumed; double-resume.","commonSituations":"Tooling that resumes defensively after timeouts; UI buttons wired to resume unconditionally; resume racing with an automatic step.","solutions":["Guard the call: only resume when isPaused() is true.","Track pause state externally and skip redundant resumes.","Treat 'Debugger is not paused' as a no-op in catch."],"exampleFix":"// before\nawait dbg.doResume();\n// after\nif (dbg.isPaused()) await dbg.doResume();","handlingStrategy":"type-guard","validationCode":"// Only resume when the debugger is actually paused.\nif (dbg.isPaused()) {\n  await dbg.doResume();\n}","typeGuard":"const canResume = (dbg: { isPaused(): boolean }) => dbg.isPaused();","tryCatchPattern":null,"preventionTips":["Guard resume calls with isPaused().","Track pause state externally to avoid redundant resumes.","Treat 'Debugger is not paused' on resume as a no-op, not an error path."],"tags":["debugger","inspector","state"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}