0
点赞
收藏
分享

微信扫一扫

VSCode运行html

追梦人的自留地 2022-09-01 阅读 247

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

VSCode运行html_html

 

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

VSCode运行html_chrome_02

 

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

VSCode运行html_chrome_03

 

 4、选择“Others”

VSCode运行html_html_04

 

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

VSCode运行html_json_05

 

 6、修改tasks.json

{
//https://go.microsoft.com/fwlink/?LinkId=733558
//"version": "2.0.0",
"tasks": [
{
"label": "在Chrome中运行",
"type": "process", //"command": "Chrome",
"args": ["${file}"],
"windows": {
"command": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe""group": "build",
"presentation": {
//"reveal": "never" //[always,never,silent]
//"problemMatcher": "$msCompile"
}
]
}

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

VSCode运行html_chrome_06

 

 

VSCode运行html_chrome_07

 

举报

相关推荐

0 条评论