在Ubuntu下显示Visual Studio代码的错误

我有几天的Visual Studio代码的问题:它是不可能启动它(实际上,窗口几乎全黑),这里是从terminal启动它的控制台输出:

bash: impossible de régler le groupe de processus du terminlal (-1): Ioctl() inapproprié pour un périphérique bash: pas de contrôle de tâche dans ce shell [3267:0609/135005:ERROR:buffer_manager.cc(361)] [.CommandBufferContext.Compositor-0xc0a90cb29a0]GL ERROR :GL_INVALID_ENUM : glBufferData: <- error from previous GL command [3267:0609/135007:ERROR:texture_manager.cc(2278)] [.CommandBufferContext.RenderCompositor-0x29650b4d9c60]GL ERROR :GL_INVALID_ENUM : glTexImage2D: <- error from previous GL command [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_ENUM : GLES2DecoderImpl::DoBindTexImage2DCHROMIUM: <- error from previous GL command [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2113)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_OPERATION : ScopedTextureBinder::ctor: was unhandled [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command [3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command 

我有同样的问题,并安装virtualbox客户添加版本5.0.16真的解决了这个问题。 但是,正如VS代码项目网站的FAQ部分所述,你也可以用--disable-gpu选项来运行VS代码,这也解决了这个问题。 从官方FAQ:

VS代码主窗口是空白的?

Visual Studio Code使用的Electron shell在某些GPU(图形处理单元)硬件加速时遇到了麻烦。 如果VS Code显示一个空的主窗口,可以尝试添加Electron –disable-gpu命令行开关,启动VS Code时禁用GPU加速。

在Ubuntu上首先尝试从终端运行Visual Studio代码:

 code 

如果有任何包错误安装它。 然后,如果有黑屏,然后去:

 sudo vi /usr/share/applications/code.desktop 

将禁用的gpu行添加到以下内容:

 Exec=/usr/share/code/code --disable-gpu %U