Skip to content

"&"warning: GDB: Failed to set controlling terminal " in ubuntu 16.04  #76

Open
@ctuu

Description

@ctuu

I use VScode to debug C code in Ubuntu on gnome-termial, that's mean I add

"terminal": "",

to my launch.json

The problem is when I debug on the terminal, there are some strange things display:

&"warning: GDB: Failed to set controlling terminal: \344\270\215\345\205\201\350\256\270\347\232\204\346\223\215\344\275\234\n"

but my code run normally.

there are my launch.json

{
"version": "0.2.0",
"configurations": [
{
              "name": "Debug",
              "type": "gdb",
              "request": "launch",
              "target": "${file}.o",
              "cwd": "${workspaceRoot}",
              "terminal": "",
              "preLaunchTask": "gcc"  
}
]
}

and my task.json

{
"version": "0.1.0",
"command": "gcc", // gcc
"args": ["-g", "${file}", "-o", "${file}.o"],
"showOutput": "never",
"problemMatcher": {
"owner": "c",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.):(\d+):(\d+):\s+(warning|error):\s+(.)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions