debugging 如何在VS Code调试中使用Edge并使其始终打开私有(匿名)窗口?

jvlzgdj9  于 2023-06-23  发布在  其他
关注(0)|答案(2)|浏览(134)

这是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": "msedge",
      "request": "launch",
      "name": "Launch Edge against localhost",
      "url": "http://localhost:3000/signup",
      "webRoot": "${workspaceFolder}",
    }
  ]
}
jvidinwx

jvidinwx1#

尝试将"runtimeArgs": ["-inPrivate"],添加到启动配置中。
runtimeArgs的文档:“* 传递给运行时可执行文件的可选参数。*”
参见Can Microsoft Edge be launched in “Private Mode” through cmd?

m0rkklqb

m0rkklqb2#

尝试将此属性添加到您的Edge启动配置:
“runtimeArgs”:["--inprivate”]
例如:

{
  "type": "msedge",
  "request": "launch",
  "name": "Launch Edge against localhost",
  "url": "http://localhost:3000/signup",
  "webRoot": "${workspaceFolder}",
  "runtimeArgs": [
   "--inprivate"
 ]
}

希望这对你有帮助。

相关问题