You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Browser library processes are not closed properly when running from VS Code #635
Whenever I run a test that includes Browser Library from VSCode (using the play button) some of the process tree remains. They are zombie processes, since the parent python.exe processes are closed.
Example where I tested with Chromium (screenshot from System Informer):
At first, I thought that this was a Browser Library issue, but it seems not the case. I tried all the following:
When I use the CLI with a robot command, it works as expected ✅
When I use the CLI with a pabot command, it works as expected ✅
When I use the CLI with a robotcode command, it works as expected ✅
When I use the VS Code play button provided by the robotcode extension, it creates zombie processes ❌
When I use the PyCharm play button provided by the robotcode extension, it works as expected ✅
There seems to be something specifically related to the VS Code extension.
Steps To Reproduce
Steps to reproduce the behavior:
Open a project that uses Browser Library in VS Code
Find a test that opens a browser
Run a test from the IDE using the play button
Let the test finish (pass or fail, does not matter)
Observe in the task manager that a node.exe process and multiple browser processes remain
Expected behavior
All processes close after test is done. No zombie processes remain.
Screenshots/ Videos
Not applicable
Logs
Not applicable
Additional context
I'm not sure which info to provide. So please let me know what info can help you with this :)
AI / tooling disclosure
Not applicable
Desktop (please complete the following information):
changed the title [-][BUG] Browser library processes are not closed properly when running from IDE[/-][+][BUG] Browser library processes are not closed properly when running from VS Code[/+]on Jul 13, 2026
I found the cause. After a run from the Test Explorer or the play button, VS Code sends a terminate request to the debugger although the run has already ended. The debugger answered it by raising SIGINT in its own process, which at that point was only waiting for VS Code to disconnect, and the CLI ended on that interrupt with os._exit(253). os._exit skips Python's atexit handlers, and the Browser library stops its Playwright node process and the browsers in such a handler, so they were left behind. That's why it only happened with the play button in VS Code: the command line and PyCharm don't send terminate after the end of a run. As a side effect, every such run also ended with exit code 253 instead of Robot Framework's result.
Fixed in 552a354: the debugger no longer interrupts its process once the run has ended. I reproduced the problem before the fix (Linux, Browser 20.6.0, headless Chromium: the node and Chromium processes stayed and the exit code was 253) and checked that nothing is left after it. The fix will be in the next release.
Closing this, since the fix is on main and will be in the next release. If the processes still stay behind with that release, please reopen this issue.
Activity
[-][BUG] Browser library processes are not closed properly when running from IDE[/-][+][BUG] Browser library processes are not closed properly when running from VS Code[/+]d-biehl commentedon Jul 14, 2026
need to investigate this. maybe the debugger is terminating to early.
Lakitna commentedon Jul 15, 2026
For completeness stake, and unsurprisingly, this also happens in robotcode v2.7.0
RachmatKaligis commentedon Sep 9, 2026
I can confirm this with my team, we have had the issue now for a while.
d-biehl commentedon Oct 21, 2026
I found the cause. After a run from the Test Explorer or the play button, VS Code sends a
terminaterequest to the debugger although the run has already ended. The debugger answered it by raising SIGINT in its own process, which at that point was only waiting for VS Code to disconnect, and the CLI ended on that interrupt withos._exit(253).os._exitskips Python'satexithandlers, and the Browser library stops its Playwright node process and the browsers in such a handler, so they were left behind. That's why it only happened with the play button in VS Code: the command line and PyCharm don't sendterminateafter the end of a run. As a side effect, every such run also ended with exit code 253 instead of Robot Framework's result.Fixed in 552a354: the debugger no longer interrupts its process once the run has ended. I reproduced the problem before the fix (Linux, Browser 20.6.0, headless Chromium: the node and Chromium processes stayed and the exit code was 253) and checked that nothing is left after it. The fix will be in the next release.
d-biehl commentedon Oct 21, 2026
Closing this, since the fix is on main and will be in the next release. If the processes still stay behind with that release, please reopen this issue.