vscode启动不了的问题解决

avatar
作者
筋斗云
阅读量:0

1、安全模式下启动vscode从中查看日志:

code --verbose
 at Ce.d (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:116:3783)     at Ce.a (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:116:1219)     at Ce.main (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:116:1040)     at Object.<anonymous> (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:117:1544)     at _._safeInvokeFunction (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:3:1245)     at _._invokeFactory (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:3:1425)     at _.complete (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:3:1682)     at a._onModuleComplete (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:4:1051)     at a._resolve (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:4:510)     at a.defineModule (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:3:5561)     at f (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:4:1741)     at w (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:2:2448)     at Object.<anonymous> (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:116:565)     at Object.<anonymous> (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:117:1555)     at r._createAndEvalScript (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:2:2492)     at C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:2:2133     at E (C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:2:3921)     at C:\Users\yonghu\AppData\Local\Programs\Microsoft VS Code\resources\app\out\main.js:2:4103     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) [main 2024-08-03T00:52:23.831Z] Lifecycle#kill() [main 2024-08-03T00:52:23.831Z] Lifecycle#onWillShutdown.fire()

 

2、或者从系统日志中看究竟。

eventvwr  

查看系统事件日志(仅适用于 Windows)

如果你怀疑是系统级别的问题,可以查看 Windows 事件查看器中的应用程序日志:

  1. Win+R 打开运行窗口。
  2. 输入 eventvwr 并按回车。
  3. 在事件查看器中,导航到 “Windows 日志” > “应用程序”。
  4. 查看与 VSCode 相关的错误日志。

3、下载vscode进行重新安装并修复。

Documentation for Visual Studio Code

4、恢复完成。

    广告一刻

    为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!