【发布时间】:2020-11-26 22:06:49
【问题描述】:
我正在使用Debugger for Chrome VS 代码扩展。我正在使用 yarn start 开发一个 React 项目,该项目在 localhost:3000 打开。
我已经使用我的 Google 帐户登录了一个正在运行的 Chrome 实例。但是,当我点击“针对 localhost 启动 Chrome”时,该选项卡会在我未登录的新 Chrome 实例中打开。
我该如何强制标签在我已经运行的 Chrome 实例中打开?
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
]
}
【问题讨论】:
-
您找到解决方案了吗?我陷入了同样的境地。请发布您找到的任何解决方案/解决方法。这会很有帮助。
-
我将其发布为对我自己的 q 的回答,但它一直被否决,因此我将其删除。继续看看它是否适合你(添加
"userDataDir": false):briandesousa1.wordpress.com/2018/05/12/…
标签: google-chrome visual-studio-code vscode-debugger