fix(debug-controller): drop recorded actions when recording session ends - #42458
Open
Ashraf Ali (ashrafiucse) wants to merge 1 commit into
Open
fix(debug-controller): drop recorded actions when recording session ends#42458Ashraf Ali (ashrafiucse) wants to merge 1 commit into
Ashraf Ali (ashrafiucse) wants to merge 1 commit into
Conversation
The debug controller accumulates recorder actions in a closure and re-sends the full list in every `sourceChanged` event. The list was never cleared when recording was disabled, so a subsequent recording session on the same page leaked the previous session's actions: a late signal (dialog, navigation, popup) re-rendered a stale action as the last one, and clients that diff by count - like the VS Code extension's "Record at cursor" - inserted that stale action into the editor. Clear the accumulated actions when the recorder mode switches to 'none', so each session starts from a clean list. Fixes: microsoft#42218
This was referenced Aug 29, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
none, so the next recording session on the same page starts from a clean listAddresses the cross-session variant of #42218. The mid-recording variant is fixed on the extension side: microsoft/playwright-vscode#807
Related: #42461 keeps the browser open after stopping a debug session, extending the record-after-debug workflow (#37822).