Open
Description
Currently, in order to attach to a process, I need to provide the following fields in my launch.json:
{
"name" : "Attach (gdb)",
"type" : "cppdbg",
"request" : "attach"
"program" : "${workspaceFolder}/path/to/program",
"processId" : "${command:pickProcess}",
"MIMode" : "gdb"
}
In my tests, it seems that the program
field is validated (i.e. the executable exists, it is a valid executable), but it is completely ignored when debugging. I can set "program" = "/bin/bash"
and attach to any process I want. But if I set "program" = "non existent file"
, I get a launch error that the program doesn't exist.
So why do I need to provide a path to the executable, when it is not needed?
Of course, it would be nice if ${command:pickProcess}
would use this field to filter the processes, but it doesn't. Even then, it should be optional.