VSCode运行html

1、将项目文件夹添加到工作区

VSCode运行html

 

 2、点击“终端”,选择“配置任务”

VSCode运行html

 

 3、选择“使用模板创建tasks.json文件”

VSCode运行html

 

 4、选择“Others”

VSCode运行html

 

 5、tasks.json新建,默认如下

VSCode运行html

 

 6、修改tasks.json

VSCode运行html
{
    // 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"
        }
    ]
}
VSCode运行html

7、选中需要运行的html文件,按住Ctrl+Shift+B,选择“在Chome中运行”

VSCode运行html

 

  VSCode运行html

 

VSCode运行html

上一篇:js中判断某个字符串是否包含某个字符的几个方法


下一篇:彻底玩透Netty,高并发,高性能RPC 框架!一份文档深入浅出