microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.5k stars 1.55k forks source link

Debugging fails with error message about gnome-terminal options #2138

Open nbilling opened 6 years ago

nbilling commented 6 years ago

Type: Debugger Debugging fails with error message about gnome-terminal options. From debug console: 1: (406) term-stderr:Option "--title" is no longer supported in this version of gnome-terminal. 1: (487) term-stderr:Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Unknown or unsupported transport 'disabled' for address 'disabled:'

(This is caused by an update to gnome-terminal deprecating options used by the c++ extension, presumably.)

nbilling commented 6 years ago

@WardenGnaw @pieandcakes

pieandcakes commented 6 years ago

Workaround would be to roll back a version.

nbilling commented 6 years ago

Note: I was wrong about the cause of this. It's actually related to a (possibly the current) version of code insiders.

pieandcakes commented 6 years ago

@nbilling I updated title.

Terminal:/org/gnome/Terminal/Factory0: Unknown or unsupported transport 'disabled' for address 'disabled:' is the error now.

copeland3300 commented 6 years ago

Update: see last paragraph

I'm also running into this issue...mine may be related to the fact that I'm using ssh and X11 forwarding.

I'm on Ubuntu 16.04 Desktop.

Error is the following:

1: (321) LaunchOptions MIMode='gdb'
1: (321) LaunchOptions  MIDebuggerPath=''
1: (321) LaunchOptions  WaitDynamicLibLoad='false'
1: (321) LaunchOptions>
1: (321) LaunchOptions    <SetupCommands>
1: (321) LaunchOptions    </SetupCommands>
1: (321) LaunchOptions</LocalLaunchOptions>
1: (430) TempFile=/tmp/Microsoft-MIEngine-fifo-u5zthgy4.r43
1: (430) TempFile=/tmp/Microsoft-MIEngine-fifo-510wt5dt.kr3
1: (430) TempFile=/tmp/Microsoft-MIEngine-fifo-o3hwebrz.wcd
1: (664) term-stderr:Option "--title" is no longer supported in this version of gnome-terminal.
1: (664) term-stderr:Failed to connect to Mir: Failed to connect to server socket: No such file or directory
1: (664) term-stderr:Unable to init server: Could not connect: Connection refused
1: (664) term-stderr:Failed to parse arguments: Cannot open display:

I had also gotten a different error, but can't replicate it at the moment.

One solution I found was to uninstall gnome-terminal completely, which forces it to use xterm.

It would be nice if we could either specify our own terminal or choose between gnome-terminal or xterm.

After a reboot, I was able to replicate the other error:

1: (802) term-stderr:Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Unknown or unsupported transport 'disabled' for address 'disabled:'
 R: {"success":false,"message":"Unable to start debugging. Failed to initialize debugger terminal.","request_seq":2,"command":"launch","body":{"error":{"id":1104,"format":"Unable to start debugging. Failed to initialize debugger terminal.","variables":null}},"running":false,"refs":null,"seq":0,"type":"response"}
C disconnect: {"restart":false}
 R: {"success":true,"message":null,"request_seq":3,"command":"disconnect","body":null,"running":false,"refs":null,"seq":0,"type":"response"}

Also, I found that everything works fine if I'm on the local machine's desktop. It seems to be the X11 forwarding that's causing some issues.

After some additional testing, VSCode 1.25.1 does not have this issue with gnome-terminal. I'm not sure if it's actually VSCode that's causing the issue or perhaps the version of the extension, but the debug window pops up without an issue when I reinstalled with 1.25.1 rather than 1.26.1. I also tried with the insiders build for 1.27 which was downloaded on 8-28-2018, and it did NOT work.

The extension version seems to be 0.18.1.