microsoft / microsoft/vscode-cpptools

RedHat/CentOS el7.x86_64 - GDB: Failed to set controlling terminal; Creates a file with name "2"

Offen
#2,787 8 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@pieandcakes arbeitet bereits daran.

Seit 07.11.2018.

debugger
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Originally posted by @FranzDeCopenhague in https://github.com/Microsoft/vscode-cpptools/issues/264#issuecomment-352234542

I am also seeing this in CentOS 7.

My launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/bin/syshealth",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/build/bin",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "build"
        }
    ]
}

My c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE"
            ],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++11",
            "intelliSenseMode": "clang-x64",
            "compileCommands": "${workspaceRoot}/build/compile_commands.json"
        }
    ],
    "version": 4
}

When I try to launch the debugger, I get a terminal window that appears that says: &"warning: GDB: Failed to set controlling terminal: Operation not permitted\n".

The VSCode debugger is inoperable:

  • Clicking on the pause button produces no results (only restart and stop do)
  • the debug console prints Unable to perform this action because the process is running. no matter what GDB command I send.
  • no variables or symbols appear in the debug pane.

Another interesting symptom is that a file with the name "2" appears in my build/bin directory with the contents -e c 1. This file only appears after I attempt to launch a debugging session.

Running GDB standalone from a separate terminal session doesn't seem to have any problem.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.