1.tasks.json
(1)作用:tasks.json文件告诉VSCode代码如何编译代码
(2)位置:终端->配置任务 可以打开tasks.json
(3)解释:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",//任务名称
"type": "shell",//任务类型
"command": "echo Hello"//命令行:编译器(可执行文件)的路径
}
]
}
2. launch.json
(1)作用:launch.json 是用于运行和调试的配置文件
(2)位置:
(3)解释:
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-msedge",//配置类型
"request": "launch",//模式,launch模式允许断点调试
"name": "Launch Chrome against localhost",//运行和调试任务的名称
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}