microsoft / microsoft/vscode-cpptools

Centos/RHEL7: Unable to start debugging. Failed to initialize debugger terminal.

Open
#2,489 22 comments 0 reactions 1 assignee View on GitHub

@pieandcakes is already working on this.

Since Sep 7, 2018.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger
Input information below

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug
-Centos 7.3, 7.4, 7.5:

  • VS Code Version: 1.26.1

  • C/C++ Extension Version: 017.3 ... 0.18.1

  • Other extensions you installed (and if the issue persists after disabling them): cmake-tools (problem exists also without)

  • when trying to strart debugging a window pops up:
    Unable to start debugging. Failed to initialize debugger terminal.
    To Reproduce
    a hello world cpp app
    try to debug it with standard launch.json:

    "version": "0.2.0",
    "configurations": [
    {
    "name": "(gdb) fbMon",
    "type": "cppdbg",
    "request": "launch",
    "program": "${workspaceRoot}/bin/x64/release/a.out",
    "args": [
    "-s"
    ],
    "stopAtEntry": true,
    "cwd": "${workspaceRoot}",
    "environment": [],
    "externalConsole": false,
    "MIMode": "gdb",
    "miDebuggerPath": "/usr/bin/gdb",
    "setupCommands": [
    {
    "description": "Enable pretty-printing for gdb",
    "text": "-enable-pretty-printing",
    "ignoreFailures": true
    }
    ]
    }
    ]
    }
    Additional context

  1. reading through other, similar complaints I found that this might bew related to gnome-terminal. My use case is a remote ssh to the centos machine in question. vscode is run over remote ssh with X-forwarding. I tried launching gnome-terminal from my ssh console: that works. However, if try launching gnome terminal from inside the vscode terminal window, that fails with an error: Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Unknown or unsupported transport “disabled” for address “disabled:”

  2. I tried downgrading the cpp extension to 17.3 but that too isn't working. I have been using vscode on centos7 for quite a while now (since it first came out), with varying degree of success (glibc 2.17 issues, etc.) and the debugger did use to work. I admit I haven't debugged in awhile, so I can't say when this issue has crept in, but seems before 0.17.3.

  3. Update: As I was pretty sure I was debugging in May this year, I downgraded to extension V. 0.16.0 that didn't help. I had to downgrade vscode itself to 1.23 . That works also with the latest version of the extension (0.18.1). Now of course, all sorts of other things are broken.

  4. Working my way back up 1.24.1, 1.25.1, it shows that the problem appeared in the July version of vscode: 1.26.1. The question is, should this be reported/handled here or with the vscode people (who would that be?)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.