Tomo10
Tomo10

Reputation: 309

Open Link in VSCode Will Create a New Web Browser Under Same Icon as VSCode

I am using VScode version 1.45 with Firefox version 76.0.1 as a default browser (with Ubuntu 18.04.4 LTS). Whenever I tried to open a link in the VSCode, it will open the Firefox browser under same icon as VSCode, and I cannot merge these tabs into existing Firefox web browser.

Same thing also happens when I try to run a program using live server extension. But when I use npm to start the development server, it will create a new window or tab under the Firefox icon.

How could I fix this so whenever I open a browser from VSCode, it will create a new browser or tab under the appropriate (Firefox) icon? Thank you.

Upvotes: 17

Views: 12343

Answers (3)

basel juma
basel juma

Reputation: 2117

I found this solution the best solution

You might have installed VSCode as a snap package, which causes $XDG_CACHE_HOME to be set to ~/snap/code/common/.cache, which could cause some cli tools to mistake that for your cache directory, and install/launch binaries from there.

If you install VSCode from the .deb download, it should fix your issue

I removed vscode from Ubuntu software and download the .deb file from vscode site and install it ... problem solved

Upvotes: 2

Dipen Shah
Dipen Shah

Reputation: 26075

There is already an issue on VSCode's GitHub repository and as it is mentioned in the issue, origin of the issue is in snapd.

To fix the issue, as mentioned on aforementioned github issue:

  1. Open some URL from the VSCode snap.
  2. In the new window, navigate to about:profiles.
  3. Ensure that the profile marked as "Default Profile" matches Firefox when opened normally. If not, use the "Set as default profile" button under the correct profile to change the default.

enter image description here

Upvotes: 38

Fareed Khan
Fareed Khan

Reputation: 2923

Try making firefox your default browser thorugh firefox and also do check that firefox is your default browser from vscode

enter image description here

Upvotes: 1

Related Questions