I am setting up my VS Code environment for the first time, but I can't figure out how to set Chrome as the default browser for the workspace.
-
2please see: https://stackoverflow.com/questions/43433262/how-to-change-the-default-browser-in-visual-studio-code-latest-released – Rushikumar Nov 27 '17 at 21:10
-
The answer at that question didn't actually solve my problem. I wonder why the search functionality didn't find that information for me before I asked my question. I searched on "default browser in VS Code" among other things. – Su Llewellyn Nov 27 '17 at 21:20
-
2windows 7: `Controlpanel --> Programs-->set default programs -> chrome -> set all as default` worked for me – Coty Embry May 10 '18 at 16:05
-
11That solution would change the browser system wide. Not at VS Code level. – María Arias de Reyna Domínguez Dec 17 '19 at 08:12
-
1press window key, type default apps, and change it from there – Muhammad Umer Dec 29 '21 at 23:07
-
1It looks like it is impossible – neves Feb 04 '22 at 16:23
17 Answers
Go to file-> preferences -> user settings -> search "By Default it will open your default favorite browser" set your browser.

- 309
- 2
- 4
-
66
-
code -> preferences -> settings -> search "By Default it will open your default favorite browser" or just "browser". works for me on version: 1.48.2 – j roc Sep 07 '20 at 18:53
-
1In mine vsCode version - 1.49.0, I've placed 'browser' in search and it shows me the field where I can type prefered brouser. – Kiril Dobrev Sep 21 '20 at 10:57
-
24in ver 1.63.2 searching for "browser" does not display this configuration – neves Feb 04 '22 at 16:09
-
This is a Live Server extension setting. It won't exist is you haven't installed Live Server (`ritwickdey.liveserver`). – Merchako Apr 07 '23 at 16:20
The other StackOverflow questions regarding the browser, had to do with opening a specific file. Here are the steps to creating a tasks.json file in a brand new environment.
- From the Tasks menu, Select 'Configure Tasks'
- The entry field prompts you for 'Select a task to configure'
- Choose 'Create tasks.json file from template'
- Edit the file to include the following block:
{
"version": "0.1.0",
"command": "Chrome",
"windows": {
"command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
},
"args": ["${file}"]
}

- 16,507
- 9
- 88
- 138

- 2,660
- 2
- 19
- 33
-
7
-
This is not working in my case. I try to open links from VSCode and It uses Edge. – mrcbns Sep 05 '22 at 16:17
-
Any other tips to make this work? is this still valid in 2023? I added the block and and keeps openig in my default browser instead. thanks – Pabluez Feb 03 '23 at 23:30
Chrome can be launched by way of debugging your application. Within launch.json, the configurations[].serverReadyAction.action
configuration was given a possible value of debugWithChrome
in the VS Code February 2019 release. Note that this will also require you have the Debugger for Chrome extension installed. You will not receive a warning if the extension is not installed and you've configured launch.json to use debugWithChrome
.
Note: Configuring launch.json with debugWithChrome
will work even if you launch using CTRL+F5 to run the app without debugging.
-
Oops. `The pattern is only matched in the Debug Console. It doesn't yet work if the debug target is launched in the Integrated Terminal (and it will never work in external terminals).` and `The feature does not warn if debugWithChrome is configured but the Debugger for Chrome extension is not installed.` Am I the only person to launch my node servers from integrated terminal? Also, Debugger for Chrome seems a bit erratic. Check your VSCode notifications (little bell icon, bottom right) – zipzit Feb 24 '20 at 20:23
-
I'm stuck here at launching my react app via `npm start`, then `launch chrome against localhost`. App works fine on Chrome, but debugger opens up MS Edge for the debugging. Not so good, I've been using Chrome dev tools for too long. Anybody else? – zipzit Feb 24 '20 at 20:27
-
This currently works in 2022 and the Debugger For Chrome extension is no longer required. – Neutrino Mar 23 '22 at 13:30

- 49,934
- 160
- 51
- 83

- 77
- 1
- 1
-
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/26869824) – sɐunıɔןɐqɐp Aug 06 '20 at 08:41
-
@sɐunıɔןɐqɐp The 'link' was to an image (which I've now embedded). – Adrian Mole Aug 06 '20 at 08:49
-
no good for debugging, unfortunately, VSCode keeps going to default Windows browser instead of what you set here! – MC9000 Jun 23 '21 at 02:17
This Alternate Way helped me:)
GoTo-->Google Chrome-->Settings-->Default browser-->Set Google Chrome as default browser

- 1,084
- 12
- 20
-
43This changes the default browser system wide. Not at VS Code level. – María Arias de Reyna Domínguez Dec 17 '19 at 08:10
-
1Well, after trying others solutions, which didn't work or I couldn't even find settings with "browser" tag in VS Code, finally I just tried this easy one and, unbelievable, it helped! I thought that Google is my default browser in system, but it didn't. This little, simple solution works great. – Kida May 31 '21 at 07:02
-
And my browser was already set to Firefox, at the system level, but I couldn't get VS Code to stop starting Chrome – Auspex Jul 13 '21 at 14:39
-
Tried everything else and this was the solution (even after setting the default browser to Chrome in Windows) -- perhaps because I had Chrome open already – Sludge Apr 22 '22 at 23:39
-
The method of modifying tasks.json no longer works in newer versions of Visual Studio Code. The easiest way to be able to launch your code in a browser is to install the Open in Browser extension from the marketplace.
After it is installed and VS Code is reloaded, you can go to your code and press ALT + B to launch your application in your default browser or ALT + SHIFT + B to select the browser you want to use.
You can also right click and select these option from a drop down menu, but I mention this last because this currently does not work in some versions of VS Code.

- 707
- 7
- 13
Just a helper for the windows users, I just installed windows 10 again and I was wondering how do I set my vscode to open the server (web) using chrome instead of edge, so to do that you just have to configure your windows to use google chrome as default, you don't need to change anything in vscode, I hope this helps someone.
ps: normally you can go open browser you want to be default and setup the configuration. so in chrome you have to go to configurations and scroll down to default browser.

- 27
- 3
-
Exactly, in general, this setting is under Windows. Chrome just redirects to it. – Bronek Jul 05 '22 at 10:53
-
When you want to use your own browser using "Open with Live Server"
without change OS globally configuration.
In Windows, Visual Studio Code (ver. 1.70.1 (July 2022))
. Go to "File"
> "Preferences"
> "Settings"
Then select a tab, "User" tab if you want your desired browser for all your projects, or select "Workspace" tab or "ProjectName" tab for especified projects.
Then go to "Extensions"
> "Live Server Config"
> "Settings: Custom Browser"
finally change the 'null'
value selecting the browser of your preference from the list (apparently this list depends on installed browsers but i'm not sure).

- 11
- 1
search for local.testsettings on vscode on the search and for web tests, change the browser to chrome and apply.

- 11
- 2
The Live Server extension was not appearing for me on settings. However, I installed Open in Browser and typed "liveServer.settings.CustomBrowser" in settings and the extension appeared with a dropdown box in which I was able to change the default browser.
Hope this helps!

- 3
- 3
This may be old but I found something that could help.
First go to Settings/Apps/Default Apps. Set your browser as default.
Next go to VSCODE and go to File/Preferences/Settings/Extensions/LiveServerConfig
Then scroll to settings: CustomBrowser Change it to your custom browser
Note- If the browsers don't show up on VSCODE then you need to set it to default in the settings.

- 11
- 1
You can adjust settings in your computer to open.HTML file extensions in chrome as a default browser: for Example in PC windows:
go to Control Panel > Default programs > Associate a file type or protocol with a specific programs >HTML extension and choose Chrome.

- 9
- 4
None of the above works in my case(my version is August 2022 1.71) to make it work I went straight to **
- File-->Preferences-->Settings-->Extensions-->Plugin open-in browser
** from there was a option which says Default set browser so I choose Brave as there is no ads in it while playing the video as chrome plays ads so for getting a proper feeling of using my self made Jarvis I used Brave.
Thanks

- 1
Click settings -> enter: default browser -> find: Open-in-browser:Default -> enter: Google Chrome

- 415
- 1
- 4
- 6
-
3There are no settings with the word "browser" let alone "default browser". – Taylan Jul 02 '20 at 11:44
-
@Taylan, there is *after* you add the 'Open in Browser' extension by 'TechER'. Here's a 2-minute video that shows how: https://www.youtube.com/watch?v=T8DrI6K8ArE I used the latest version that i found (version 2.0), by the same developer. (The video shows an earlier version.) Then follow Min Guo's advice above. (I set mine to 'FireFox', not Chrome tho, because i don't have Chrome installed on this computer. And now VS Code opens it in FireFox perfectly for me, while still allowing my OS to have a different default browser [Chromium] which does not load correctly from this extension.) – Shawn Kovac Jul 24 '20 at 03:00
Google Chrome > Settings (left sidebar) > Default browser = Google Chrome
-
1This sets Chrome as the OS’s default browser, not just in VS Code. – superhawk610 Mar 22 '21 at 10:41
Just change your default web browser in your OS. In Windows 10, you can search "default browser" then the wizard for changing it, will be appear.

- 1
-
This doesn't answer the question. Many developers use one browser for development work (like Chrome) and one for day-to-day web browsing (like Firefox). OP specifically asks 'for the workspace' which indicates they want to limit its usage to that, not set it as the OS default. – Ian Paschal Oct 06 '21 at 13:54