经查证明是windows凭证过多而导致的每次VSCode无法自动获取并登录
执行命令清空与VSCode相关的所有凭证
cmdkey /list | Select-String -Pattern "LegacyGeneric:target=(vscode.+)" | ForEach-Object { cmdkey.exe /delete $_.Matches.Groups[1].Value }
cmdkey /listSelect-String -Pattern "LegacyGeneric:target=(vscode.+)"vscode 开头 的 LegacyGeneric 类型凭证(这是 VSCode 存储的登录凭据的常见格式)。ForEach-Object { cmdkey.exe /delete $_.Matches.Groups[1].Value }“你的命令是安全且针对性的,不会对系统或其他应用造成影响。如果目的是解决 VSCode 频繁登录问题,这一步是合理的。”