目前,当我想调试我的代码时,Visual Studio会打开一个新的Chrome实例。我希望Visual Studio打开我当前Chrome实例的新标签。
我尝试用这个来编辑lauch.json文件,但他不起作用:
"configurations": [
{
"type": "chrome",
"request": "attach",
"name": "Attach to Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
]
编辑:我的Visual Studio代码版本为1.21.1
答案 0 :(得分:0)
我实际上只是问过same question-这对我有用(source):
{
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}",
"userDataDir": false,
},
]
}