1、プロジェクトフォルダは、ワークスペースに追加されます
2.「ターミナル」をクリックして「構成タスク」を選択
3、「tasks.jsonファイルを作成するために、テンプレートを使用」を選択
4、「その他」を選択
5、tasks.json新しいデフォルトでは、次の
6、修正tasks.json
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "在Chrome中运行", "type": "process", // [shell,process] "command": "Chrome", "args": ["${file}"], "windows": { "command": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" }, "group": "build", "presentation": { // Reveal the output only if unrecognized errors occur. "reveal": "never" //[always,never,silent] }, // Use the standard MS compiler pattern to detect errors, warnings and infos "problemMatcher": "$msCompile" } ] }
7、选中需要运行的html文件,按住Ctrl+Shift+B,选择“在Chome中运行”