Solution: VS Code is set to open the browser Chrome by default

1. Problem description

In the VSCode editor, the browser that is generally opened by default is the Edge browser, and I generally use the Chrome browser, and I will encounter different problems such as page debugging, so I need to adjust the default browser of VSCode to the Chrome browser;

2. Problem solving

1. Search for open in browser in the plug-in store and install it

2. Open the file == "Preferences == "Settings

  1. Search for Open-in-browser: Default in the search bar and fill in the box below:

{"open-in-browser.default":"Chrome"}

or

Chrome

At this point, the default browser of VSCode has been modified to Chrome;

3. Expansion

1. Select a .html file and right-click to see that the shortcut key to open the default browser is alt+B, and the shortcut key to call other browsers is shift+alt+b

PS: If there are still small partners who cannot change the default browser here, you can check whether there are third-party auxiliary tools that lock the browser, such as: 360, etc. Some of them have set the mandatory default browser

Guess you like

Origin blog.csdn.net/weixin_53031149/article/details/129699272