'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.
Solution 1:[1]
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:
- Open some URL from the VSCode snap.
- In the new window, navigate to
about:profiles
. - 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.
Solution 2:[2]
Try making firefox
your default browser thorugh firefox and also do check that firefox
is your default browser from vscode
Solution 3:[3]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dipen Shah |
Solution 2 | Fareed Khan |
Solution 3 | basel juma |