项目目录下,在.vscode目录新建launch.json,输入以下内容
{
"configurations": [
{
"name": "Launch Edge",
"request": "launch",
"type": "msedge",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
如果 是chrome,
将type改为:chome
{
"configurations": [
{
"name": "Launch edge",
"request": "launch",
"type": "msedge",
"file":"${file}"
}
]
}
{
"configurations": [
{
"type": "msedge",//可以更换为chome
"request": "launch",
"name": "Launch Chrome from http",
"url": "http://localhost:5500/${fileBasename}",
"webRoot": "${workspaceFolder}"
}
]
}