Windows cannot find the file 'chrome'. Please make sure the file name is correct and try again.

This article mainly records the prompt when running HTML files in vscode:  Windows cannot find the file 'chrome', please make sure the file name is correct and try again. Solution to the problem.

Table of contents

1. Open settings

2. Search Live Server Config

(1) Install Live Server plug-in

(2) Open settings.json for editing

(3) Add configuration

3. How to check the installation path of chrome


1. Open settings

Open path: File - Preferences - Settings (shortcut key calling method: CTRL+,)

2. Search Live Server Config

Search for Live Server Config in the search box (note that it needs to be installed in advance)

(1) Install Live Server plug-in

(2) Open settings.json for editing

(3) Add configuration

Add the chrome browser application running path address at the end of the file.

   "liveServer.settings.AdvanceCustomBrowserCmdLine": "C:/Users/Administrator/AppData/Local/Google/Chrome/Application/chrome.exe",

3. How to check the installation path of chrome

Right-click on the desktop picture, properties - shortcut - target (T)

Guess you like

Origin blog.csdn.net/qq_19309473/article/details/135393430