microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.13k stars 29.27k forks source link

Vscode does not open links in default browser #233399

Open arijoon opened 11 hours ago

arijoon commented 11 hours ago

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

Version: 1.95.1
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Linux x64 5.15.0-124-generic snap

Steps to Reproduce:

  1. Enter a link in the editor such as http://duckduckgo.com
  2. Ctrl+Click the link
  3. Wrong browser is used to open the link

My default browser is firefox and if if I enter the command open http://duckduckgo.com in the terminal, it opens it in the correct firefox window, but vscode uses the wrong browser (opens in chrome). This issue is recent and I've noticed it in v1.95.1, previously it worked fine

If you can provide detail on which mime type the links are using I can further inspect the default application for the mime type, text/html is correctly configured on firefox hence not sure where the issue lies. Other applications also open the correct browser and I've only noticed the issue with vscode

gjsjohnmurray commented 11 hours ago

Has a value been set for the workbench.externalBrowser setting?

arijoon commented 8 hours ago

Has a value been set for the workbench.externalBrowser setting?

No value set. Setting the value to firefox-trunk fixes it for me, but I assume that doesn't cover the case of not respecting the default browser (thanks for the suggestion as I didn't find this option earlier)