How do I set the default browser as chrome in Visual Studio Code?
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}"]
}
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.
Go to file-> preferences -> user settings -> search "By Default it will open your default favorite browser" set your browser.