Vscode-cpptools: Debugger doesn't recognize `konsole` as a terminal on Kubuntu

Created on 3 Sep 2016  路  5Comments  路  Source: microsoft/vscode-cpptools

_From @nholthaus on September 2, 2016 13:0_

  • VSCode Version: 1.4.0
  • OS Version: Kubuntu 14.04

The debugger can't start due to the following error:

Error: unable to start debugging. No terminal is available to launch the debugger. Please install Gnome Terminal or XTerm.

IMHO, it's not a good idea to mix KDE and gnome (especially low level things like terminals), so many KDE users wouldn't have one of those two installed. Instead, vscode should recognize konsole as a terminal application.

Interestingly, the integrated terminal works just fine.

Steps to Reproduce:

  1. Make a c++ project
  2. Configure a launch
  3. Press the green triangle

_Copied from original issue: Microsoft/vscode#11451_

debugger

Most helpful comment

For anyone interested in a quick fix while waiting:

Create a /usr/bin/xterm:

#!/bin/bash
/usr/bin/konsole -e "bash -c \"$6\""

I tried using a more complete solution of konsole $(echo "$@" | sed -e 's/echo.$/\"&\"/g' -e 's/bash.$/"&"/g') but that didn't work.

All 5 comments

_From @Tyriar on September 2, 2016 19:49_

There is a PR out for this from @nholthaus #11452.

@weinand are there any debug implications when adding this as a default terminal to parts/execution?

Currently every debug extension is using their own implementation of extern terminal support (if any). So this issue is a problem of the C++ debugger and I will move the issue to their repository.

However, in the August milestone we've introduced new debug protocol API that helps debug extensions to use the integrated terminal of VS Code without having to deal with the complexity of supporting terminals on different platforms. In the future we will even support an external terminal through the same API. I suggest that debug extensions use the new 'runInTerminal' API and remove their terminal support code.

@Tyriar the terminal support in parts/execution is not used for the debugger. @jrieken would know best where it is used.

@nholthaus, it is suppose to fallback to xterm if it can't find gnome_terminal. IIRC, konsole didn't support what we needed when we tried to implement it. @pieandcakes was the dev that looked at it.

In the near future, we plan to move to the new console support that was just added to vscode.

In the meantime, can you install xterm?

We will be addressing this by supporting VSCode's debug console instead of an external console. #35 is tracking this issue.

For anyone interested in a quick fix while waiting:

Create a /usr/bin/xterm:

#!/bin/bash
/usr/bin/konsole -e "bash -c \"$6\""

I tried using a more complete solution of konsole $(echo "$@" | sed -e 's/echo.$/\"&\"/g' -e 's/bash.$/"&"/g') but that didn't work.

Was this page helpful?
0 / 5 - 0 ratings