Open A-Debord opened 4 years ago
Are you using the integratedTerminal
and what is your default shell set to?
Yes I'm using the integrated terminal and I tried with both bash and zsh as default shell (same results).
I'm experiencing the same issue.
I really doubt that debugging C/C++ in VSCode on Linux has been broken for almost 2 years. Can anyone shed some light on this?
I'm on Ubuntu 20.04, VSCode 1.67.2, launch.json is:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": {
"task": "C/C++: gcc build active file to executable"
}
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
]
}
And tasks.json is:
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc build library",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-shared",
"-fPIC",
"-g",
"-I/usr/include/glib-2.0",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"-I.",
"util.c",
"${file}",
"-lglib-2.0",
"-o",
"${fileDirname}/nlparselib.o"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "compiler: /usr/bin/gcc"
},
{
"type": "cppbuild",
"label": "C/C++: gcc build active file to executable",
"command": "/usr/bin/gcc",
"args": [
"-fdiagnostics-color=always",
"-g",
"-I/usr/include/glib-2.0",
"-I/usr/lib/x86_64-linux-gnu/glib-2.0/include",
"-I.",
"util.c",
"nlparselib.c",
"${file}",
"-lglib-2.0",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "compiler: /usr/bin/gcc"
}
]
}
My output upon starting debug is even less verbose:
&"warning: GDB: Failed to set controlling terminal: Operation not permitted\n"
[1] + Done "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-3ggeoi3f.mjf" 1>"/tmp/Microsoft-MIEngine-Out-fqkgr2tv.ftm"
Hi,
i'm trying to launch the debugger it was working fine a month ago (before vacation) now I get an error. The program doesn't seem to start at all, like nothing gets executed. however i can debug it manually using
gdb --args myprogram myargs
Terminal :
Debug Console :