I am debugging a shared C++ library called from python on Ubuntu 18.04. I can attach GDB to this using gdb -p PID (where PID is the python process ID).
I like the promises of Visual Studio Code, but the default debug launch.json requires "program" property attach, but gdb does not need this.
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
In this case, what should program be and why is it even required?