#How to set up the browser for vscode?
How to set the default browser in Visual Studio Code
First search for and install View In Browser in the plug-in extension.
The fifth icon on the left is the plug-in search area
After installation, click view in browser to view the information, and scroll down to view the Configuration column
The arrow points to the default browser for opening html
At first, my Visual Studio Code did not have a default browser, but it is not possible here. To modify it directly, copy this line of code to set the default browser in the picture: "view-in-browser.customBrowser": "chrome", and replace the chrome process name with the name of the default browser you want to set. It should be noted that the process name is not the name displayed when the task manager is opened.
To check the process name, you can open the dos command window and enter tasklist, which will display all the current process names.
Disadvantages of this method Obviously, it's just hard to find.
So I recommend another one. After opening the browser, open the task manager, then check the process that you clicked on the browser, right-click and select the location of the open file, and the name of the exe file displayed is the process name.
After filling in the corresponding name for that line of code, open the file in the upper left corner of Visual Studio Code, select Preferences, and then click Settings
and then change the Copy the code to the area on the right and then ctrl s to save it
The above is the detailed content of How to set up the browser with vscode. For more information, please follow other related articles on the PHP Chinese website!