Solution: How to set the default browser to Chrome or Firefox in VSCode

1. Problem description:

In the VSCode editor, the browser generally opened by default is the IE browser, and I am used to using the Chrome browser, and I will encounter different problems such as page debugging, so I need to use VSCode 的默认浏览the browser 调整为 Chrome;

2. Operation process:

A. First, you need VSCodeto install in the extension in : open in browserplug-in (if it is already installed, please ignore this step);
insert image description here
insert image description here

B. Take modifying the default browser Chromeas an example
选择文件 : --》首选项--》设置;
and open in browserafter , the page at this time is displayed as:
insert image description here
insert image description here
C. At this time, enter the code in the input box as:
{"open-in-browser.default":"Chrome"} , and it is already 将 VSCode 的默认浏览器It has been changed Chrometo ;
Similarly, if the default browser of VSCode is changed to Firefox, the code is: {"open-in-browser.default":"Firefox"}(But this statement has not been tested, because the browser I use is: Chrome);

D. At this time, open a file VSCodein.html and right-click with the mouse. If there is Open In Default Browsera selection , it means that the setting has been successful;
insert image description here

3. Summary:

First, where there is something wrong or inappropriate, please give me some pointers and exchanges!
Second, if you are interested, you can pay more attention to this column (a must-have column for Vue interviews):https://blog.csdn.net/weixin_43405300/category_11525646.html?spm=1001.2014.3001.5482

Guess you like

Origin blog.csdn.net/weixin_43405300/article/details/124228615