Skip to content

Error 'Unable to lauch browser: "Unable to attach to browser"' after every update #296237

@ReneZeidler

Description

@ReneZeidler

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: many versions, up to and including 1.109.3
  • OS Version: Windows 11 23H2

Steps to Reproduce

  1. Create a launch.json similar to this, at least type msedge and chrome are affected:
        {
            "name": "Launch Edge",
            "request": "launch",
            "type": "msedge",
            "url": "http://localhost:4200",
            "webRoot": "${workspaceFolder}"
        }
  1. Update Visual Studio Code
  2. Restart Visual Studio Code the first time after updating. Try to launch the browser with F5. The error Unable to launch browser: "Unable to attach to browser" will appear:
Image
  1. Restart Visual Studio Code a second time. Launching the browser with F5 works again.

Previous reports

This issue has been previously reported in #239705. The issue was closed due to an automatically applied info-needed tag that has not been removed. There's a lot of confusion in the comments - because of the nature of the issue, doing anything can seem like it fixed the issue, when in reality it was just the restart of VS Code.

It was reported again in #255774, although the reporter didn't realize the real cause of the issue and closed it again.

Additional information

Because the issue only appears once after each update of VS Code, it is intermittent and hard to reproduce.

Gathering info from the comments of the previous issue and my personal setup, the bug might only occur when VS Code is installed globally (with admin rights) while the user launching VS Code does not have admin rights. It might be specific to Windows.

Metadata

Metadata

Assignees

Labels

ai-triagedbugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesinstall-updateVS Code installation and upgrade system issueswindowsVS Code on Windows issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions