microsoft / microsoft/playwright
[Bug]: VS Code Debugging closes browser after stopping
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
### Version
1.54.0, 1.55.0, 1.56.0
### Steps to reproduce
1. In VS code, add a breakpoint inside a test
2. Right-click the test and select `Debug Test`
3. When the breakpoint is reached, click the Stop button
4. The browser is closed instead of staying open
There are 2 reasons I need to do step 3:
- The application doesn't load properly unless this is done
- I want to use the `Record at cursor` option to extend the test, but this option is disabled unless this is done
### Expected behavior
Browser does not close when the Stop button is clicked as is the behavior in playwright 1.53 and earlier
### Actual behavior
Browser closes when the Stop button is clicked.
### Additional context
I asked about this in the discord channel: https://discord.com/channels/807756831384403968/1054804523652231198/threads/1425851812300329091
### Environment
```shell
System:
OS: macOS 15.5
CPU: (12) arm64 Apple M2 Pro
Memory: 77.19 MB / 16.00 GB
Binaries:
Node: 22.15.0 - /Users/pedram/.nvm/versions/node/v22.15.0/bin/node
npm: 10.9.2 - /Users/pedram/.nvm/versions/node/v22.15.0/bin/npm
IDEs:
VSCode: 1.105.0 - /usr/local/bin/code
Languages:
Bash: 3.2.57 - /bin/bash
npmPackages:
@playwright/test: 1.54.0 => 1.54.0
```
Contributor guide
Research direction
Start by reproducing the issue through VS Code's Debug Test flow with Playwright 1.54. Compare the Stop button behavior with Playwright 1.53 and earlier, including whether the browser remains open and Record at cursor becomes available. Done means stopping the debug session no longer closes the browser.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript, vscode
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100