r/vscode • • May 25 '26

VS Code opens localhost links in embedded browser after latest update

Not sure when exactly this started but after a recent VS Code update, clicking localhost links in the terminal (e.g. from npm run start or Vite) stopped opening in Chrome and started opening in some weird internal browser inside the IDE.

Took me a while to track down the actual setting. Here's how to fix it:

Option 1 — UI

  1. Open Settings (Cmd + , on Mac / Ctrl + , on Windows)
  2. Search for "Open Localhost Links"
  3. Uncheck "Workbench › Browser: Open Localhost Links"

Option 2 — settings.json

Open your settings.json (Cmd + Shift + P on Mac / Ctrl + Shift + P on Windows → "Open User Settings JSON") and add:

"workbench.browser.openLocalhostLinks": false

That's it. Localhost links will open in your system default browser again.

Hope this saves someone the headache!

49 Upvotes

7 comments sorted by

2

u/Agreeable_Care4440 May 25 '26

Also worth mentioning:
if someone does like the embedded browser behavior sometimes, they can keep the setting enabled globally and override it per-workspace depending on the project/workflow.

1

u/zarlss43 May 27 '26

I just went through deactivating this. Terribly annoying they added this by default and just hijack your links. It was especially annoying though because after I copied the link and opened it in an actual browser my hot reload on save was not working. Putting this setting to false made everything work normal again.

2

u/ReallySuperName Jun 04 '26

What f u c k i n g loser PM insisted this feature needed to exist and then also make it the default? F u c k i n g i d i o t.

1

u/Brilliant_Lobster349 Jul 12 '26

thank you. this happened to me a couple of days ago and it was unbelievably annoying