首页 > 解决方案 > Chrome 更新搞砸了我用 VS 进行的调试

问题描述

从昨天到今天,我无法在 localhost 中启动我的项目,因为我的非安全 chrome 似乎已更新到版本 94.0.4606.61 (Build oficial) (x86_64) 并且当我启动我的混合应用程序时它应该做之前的自动登录是 200 响应,现在是 302 并进行重定向。

这里可能是什么问题?

这是我的launch.json

{
"configurations": [{
    "request": "launch",
    "name": "Launch Chrome against localhost",
    "url": "http://localhost:8100/#/Home/dashboardApp",
    "runtimeArgs": [
        "--args",
        "--disable-web-security",
        "--allow-file-access-from-files",
        "--allow-running-insecure-content",
        "--ignore-certificate-errors",
        "--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure",
    ],
    "webRoot": "${workspaceFolder}/src"
}]
}

标签: visual-studiogoogle-chrome

解决方案


1- - 下载旧版 Chromium Chrome。

https://github.com/macchrome/macstable/releases/download/v93.0.4577.82-r902210-Ungoogled-macOS/Chromium.app.ungoogled-93.0.4577.82.zip

2- 将 .app 放入您的应用程序查找器中。

3-将此添加到您的可视代码launch.json(在“配置”中)“runtimeExecutable”:“/Applications/Chromium.app/Contents/MacOS/Chromium”

4- 如果您无法打开 Chromiun,请转到系统偏好设置、安全/隐私和常规。

重要说明,不推荐使用 chrome 的扩展调试器,请将其卸载。使用 VS Code 的内部调试器。


推荐阅读