使用 VS Code 在 chrome 中调试时,我从 Chrome 收到以下警告:
看起来浏览器已经从旧的调试会话中运行了。请在尝试调试之前关闭它,否则 VS Code 可能无法连接到它。
然后我可以单击“无论如何调试”按钮,这会打开 chrome,但是当我登录到我的应用程序时它会崩溃。该应用程序在不调试时运行良好。
我的应用程序没有任何其他实例正在运行,所以我不明白这个错误。有没有人遇到过这个?
我正在运行 VS Code 1.49.0 以及 Chrome 扩展程序 v4.12.10 的调试器。Firefox 是我的默认浏览器,但调试器会启动 Chrome 进行调试。我的启动配置如下:
{
// 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": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
Run Code Online (Sandbox Code Playgroud)
我最近换了电脑,这个配置适用于上一个。我错过了什么吗?:-/