VSCode在Ubuntu中启动时会崩溃



我最近把我的工作空间改成了Ubuntu,我遇到了崩溃的问题。

vscode是由apt安装的,它可以打开几秒钟,然后自动崩溃。

我试着用code --verbose命令来解决这个问题。它显示了

[67802:0311/205929.505928:INFO:CONSOLE(626)] "%cTRACE color: #888 [File Watcher (node.js)] [CHANGED] /home/chou/.config/Code/logs/20210311T205927/telemetry.log", source: file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (626)
terminate called after throwing an instance of 'char const*'
/dev/fd/3: No such file or directory
Server response:
[67849:0311/205929.809879:ERROR:broker_posix.cc(40)] Recvmsg error: Connection reset by peer (104)

最后一行可能是由ssh扩展引起的,所以我从~/.vscode/extensions中手动删除了它。

但问题仍然存在,我也尝试过--disable-extension标志,但没有任何改变。

我现在可以进入vscode的唯一方法是通过sudo code --usr-data-dir命令。我想知道是什么原因导致这种令人沮丧的问题。

编辑:以下是exthost.log文件的最后几行:

[2021-03-11 22:07:54.814] [exthost] [debug] ProxyResolver#resolveProxy cached https://dc.services.visualstudio.com/api/profiles/AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217/appId DIRECT 
Error: Error for stack trace
at Pe (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:96:3)
at ProxyAgent.addRequest (/usr/share/code/resources/app/node_modules.asar/vscode-proxy-agent/index.js:73:16)
at new ClientRequest (_http_client.js:296:16)
at Object.request (https.js:314:10)
at Object.<anonymous> (/usr/share/code/resources/app/node_modules.asar/agent-base/patch-core.js:23:20)
at Object.<anonymous> (/usr/share/code/resources/app/node_modules.asar/https-proxy-agent/node_modules/agent-base/patch-core.js:25:22)
at /usr/share/code/resources/app/node_modules.asar/socks-proxy-agent/node_modules/agent-base/patch-core.js:23:20
at Object.U [as request] (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:96:4165)
at Function.e.makeRequest (/usr/share/code/resources/app/extensions/github-authentication/dist/extension.js:1:7505)
at Timeout.s [as _onTimeout] (/usr/share/code/resources/app/extensions/github-authentication/dist/extension.js:1:17133)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
[2021-03-11 22:07:55.351] [exthost] [info] extension host terminating: parent process 82934 does not exist anymore: kill ESRCH (code: ESRCH) (errno: ESRCH)
[2021-03-11 22:07:56.368] [exthost] [info] exiting with code 0

看起来可能是代理解析器的问题。但是我仍然不知道如何修理它。

我也遇到了同样的问题。我使用的是Pop OS 20.04 LTS,启动后Visual Studio代码会崩溃。似乎这个问题可能与混合.snap包安装和.deb包安装有关。这个github评论有一个解决方案,为我工作:(https://github.com/microsoft/vscode/issues/118727 # issuecomment - 801847011)

我不得不从Passwords and Keys应用程序中删除vscodevscode.github-authentication/github.auth条目。

如果你安装了VSCode并且它在启动时崩溃,请根据Github重新启动系统。

我试图在VSCode中打开一个ippython笔记本,我的笔记本一直崩溃,因为我在笔记本中有太多的情节。

最新更新