Skip to content

fix: keep reused browser when stopping the debugging - #808

Open
Ashraf Ali (ashrafiucse) wants to merge 1 commit into
microsoft:mainfrom
ashrafiucse:fix-37822
Open

fix: keep reused browser when stopping the debugging#808
Ashraf Ali (ashrafiucse) wants to merge 1 commit into
microsoft:mainfrom
ashrafiucse:fix-37822

Conversation

@ashrafiucse

@ashrafiucse Ashraf Ali (ashrafiucse) commented Aug 29, 2026

Copy link
Copy Markdown

Summary

  • stopping a debug session tears down the debugged test process and its page; when the page count then hit zero, onDidRunTests() and the late _pageCountChanged(0) update both killed the reused browser backend, closing the browser instead of keeping it for inspection and recording
  • keep the backend alive after a debug run ends with "Show Browser" enabled, covering both the immediate teardown and the late page-count update

Addresses microsoft/playwright#37822 (the issue is closed by the root-cause fix below; this hardens the extension side and covers workspaces pinned to older cores).

The root cause (pages torn down with the connection) is fixed core-side: microsoft/playwright#42461

Related: #807 fixes stale recorder actions inserted while editing during "Record at cursor" (microsoft/playwright#42218).

Stopping a debug session tears down the debugged test process, which
also tears down its browser page. When the page count then dropped to
zero, the extension killed the reused browser backend as well, closing
the browser instead of keeping it around for inspection and recording.

Keep the backend alive after a debug run with "Show Browser" enabled,
both when the run ends and when a late page-count update arrives.

Fixes: microsoft/playwright#37822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant