code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

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

Open ctuu opened this issue 9 years ago • 2 comments

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 } } }

ctuu avatar Oct 07 '16 12:10 ctuu

This is a known issue but I don't know how to fix it because it happens when attaching gdb to the terminal I create.

This isn't really high priority right now because its just one line of output and it doesn't break anything because the program still runs fine

WebFreak001 avatar Oct 07 '16 14:10 WebFreak001

What does "debug on the terminal" mean? Is this still happening?

What does the sequence E4 B8 8D E5 85 81 E8 AE B8 E7 9A 84 E6 93 8D E4 BD 9C used here is for`? Can we somehow unescape that before it gets send to the terminal?

GitMensch avatar Aug 21 '24 08:08 GitMensch