• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

VSCode黑屏

visual-studio-code 来源:hell03end 3次浏览
  • 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 to null 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.


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)