VSCode黑屏
- VSCode版本:1.19.0
- OS版本:视窗10 1709(16299.125)
- 转载没有扩展:是
没有办法安装1.19.0更新后打开VSCode。它总是启动空白屏幕并在调试控制台中打印2条错误消息。VSCode黑屏
index.js:5 TypeError: Cannot read property 'comments' of null at file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2920:762
at Array.forEach (native)
at e.setCustomTokenColors (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2920:735)
at new e (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2927:679)
at t.create (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:90:103)
at e._createInstance (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1209:289)
at e.createInstance (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1208:560)
at e.initServiceCollection (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4516:741)
at e.createContents (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4511:118)
at e.open (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4518:113)
onError @ index.js:5
我试图重新安装vscode或启动它没有扩展名 - 相同的结果。
更重要的是,我得到的Linux虚拟机上的同一个问题:
- VSCode版本:1.19.0
OS版本:Ubuntu的17.10 64
index.js:41 TypeError:无法在Array.forEach文件中读取属性'注释'null at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2920:762 at Array.forEach(native) e.setCustom上的 TokenColors(file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2920:735) at new e(file:/// usr/share/code/resources /app/out/vs/workbench/workbench.main.js:2927:679) at t.create(file:///usr/share/code/resources/app/out/vs/workbench/workbench.main。 js:90:103) at e.createInstance(file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1209:289) at e.createInstance(file :///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1208:560) at e.initServiceCollection(file:/// usr/share/code/resources/app /out/vs/workbench/workbench.main.js:4516:741) at e.createContents(file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js: 4511:118) at e.open(file:/// usr/share/code/resources/app/out/vs/workbench/work bench.main.js:4518:113)
回答:
这似乎是同样的问题,因为#40339,已经被固定在VSCode的主分支。该问题的里程碑(2017年11月恢复)表明它将成为1.19.1补丁版本的一部分。
现在,它看起来像你可以通过设置editor.tokenColorCustomization
到{}
(source)解决此问题:
Can you check if you have
editor.tokenColorCustomizations
set tonull
in your settings file (you can find it at ~/Library/Application Support/Code/User/settings.json). If yes, then set it to{}
instead and then try opening VS Code.
以上是 VSCode黑屏 的全部内容, 来源链接: utcz.com/qa/262614.html