microsoft/playwright · warning · Error
Debugger is not paused
Error message
Debugger is not paused
What it means
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.
Source
Thrown at packages/playwright-core/src/server/debugger.ts:96
// (e.g. recorder action-point capture) have recorded their state.
context.instrumentation.addListener(this, context, { order: 'last' });
this._context.once(BrowserContext.Events.Close, () => {
this._context.instrumentation.removeListener(this);
if (this._apiCallsFlushTimer)
clearTimeout(this._apiCallsFlushTimer);
});
}
requestPause(progress: Progress) {
if (this.isPaused())
throw new Error('Debugger is already paused');
this.setPauseBeforeWaitingActions();
this.setPauseAt({ next: true });
}
doResume(progress: Progress) {
if (!this.isPaused())
throw new Error('Debugger is not paused');
this.resume();
}
next(progress: Progress) {
if (!this.isPaused())
throw new Error('Debugger is not paused');
this.setPauseBeforeWaitingActions();
this.setPauseAt({ next: true });
this.resume();
}
runTo(progress: Progress, location: { file: string, line?: number, column?: number }) {
if (!this.isPaused())
throw new Error('Debugger is not paused');
this.setPauseBeforeWaitingActions();
this.setPauseAt({ location });
this.resume();
}View on GitHub (pinned to c8fc3bf8d3)
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.
Example fix
// before await dbg.doResume(); // after if (dbg.isPaused()) await dbg.doResume();
Defensive patterns
Strategy: type-guard
Validate before calling
// Only resume when the debugger is actually paused.
if (dbg.isPaused()) {
await dbg.doResume();
} Type guard
const canResume = (dbg: { isPaused(): boolean }) => dbg.isPaused(); Prevention
- 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.
When it happens
Trigger: Calling resume() without a preceding pause; resuming after the page already auto-resumed; double-resume.
Common situations: Tooling that resumes defensively after timeouts; UI buttons wired to resume unconditionally; resume racing with an automatic step.
Related errors
- Debugger is already paused
- Element is not ${result.missingState}
- Clicking the checkbox did not change its state
- state: expected one of (attached|detached|visible|hidden)
- Invalid location "${params.location}", expected format is <f
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/fa2856dd03ce57d1.
Report an issue: GitHub.