英文:
VS code failed to load extensions and failed to install new extension after an update
问题
今天我在几天后重新打开了我的VS Code,发现我安装并长时间使用的扩展完全消失了,并且建议我安装Java扩展。好的,我按照建议安装扩展,但失败了。
我检查了我的Code版本,它肯定是最新版本。
然后我深入日志并尝试安装一些其他扩展,发现失败总是与一个名为sharedProcessMain.js
的js文件有关。详细日志如下:
2023-02-16 09:32:06.725 [error] SyntaxError: JSON输入意外结束
在JSON.parse (<anonymous>)
在Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
2023-02-16 09:32:06.771 [error] JSON输入意外结束: SyntaxError: JSON输入意外结束
在JSON.parse (<anonymous>)
在Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
有人能提供建议吗?非常感谢!
英文:
Today I reopen my VS Code after several days, found the extensions that I installed and used for a long time disappeared totally, and it recommended me to install extension for java. OK, I followed the recommends to install extension, and failed.
I checked my Code version, it's the latest version surely.
Then I dipped into the log and tried to install some other extensions, and found the failure always related to one js file sharedProcessMain.js
. The detail log is as following:
2023-02-16 09:32:06.725 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
2023-02-16 09:32:06.771 [error] Unexpected end of JSON input: SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
If anyone who can provide any suggestion? Thank you very much!
答案1
得分: 2
我使用Windows,昨天也遇到了相同的问题。通过以下步骤解决了它:
- 关闭VSCode
- 删除整个文件夹%appdata%\Code
- 删除整个文件夹%userprofile%\.vscode
- 启动VSCode
希望对你有帮助。
英文:
On what OS are you running?
I use Windows and I faced the same problem yesterday. Solved it by
- Closing VSCode
- Removing the entire folder %appdata%\Code
- Removing the entire folder %userprofile%\.vscode
- Starting VSCode
Hope this helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论