小编Slu*_*sco的帖子

适用于 Chrome 的 VS Code + Debugger:在现有 Chrome 实例中打开选项卡,而不是新窗口?

我正在使用Chrome VS Code 扩展的调试器。我正在使用一个 React 项目yarn start,它在localhost:3000.

我有一个已经在运行的 Chrome 实例,我使用我的 Google 帐户登录。但是,当我点击“针对本地主机启动 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}"
        },
    ]
}
Run Code Online (Sandbox Code Playgroud)

google-chrome visual-studio-code vscode-debugger

8
推荐指数
1
解决办法
670
查看次数