vs code.

ctrl+shift+p 输入 configure task 类似。之后选择other xxxx.
就会在项目文件夹下多一个.vscode/ tasks.json
之后复制下面代码。
再按ctrl+shift+b。就可以显示html了。
 
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run HTML file with Chrome",
"type": "process", // [shell,process]
"command": "Chrome",
"args": ["${file}"],
"windows": {
"command": "E:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
//"E:\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"
}
]
}

猜你喜欢

转载自www.cnblogs.com/lsfv/p/9066971.html