I think this is new in Version 0.9.2.
I've been working on understanding #78 and found out that using processId in your launch.json does not work on remote debugging (using gdbserver) if the pid number you use does not exist on the local machine (even though it does exist on the remote machine).
For example:
{
"name": "C++ Attach",
"type": "cppdbg",
"request": "attach",
"miDebuggerServerAddress": "myserver:6666",
"program": "${workspaceRoot}/hello",
"processId": "13467",
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "lldb"
},
"windows": {
"MIMode": "gdb"
}
}
Even though pid 13467 exist on myserver, it doesn't exist on my localhost, and so when I run the attach, I get
Error attach: no process with the given id found
However if I make sure that pid number exists (via this trick), I get a little further, and get a different error (which existed in v0.9.1 too)
Unable to start debugging. Attaching to process 13467 with GDB failed because of insufficient privileges with error message 'ptrace: Operation not permitted.'.
I still have to work around a lot of issues (highlighted in #78) to get remote debugging working with cpptools
End result, I can't do remote debugging by pid.
(Spoiler, my end goal is gdb debugging in a docker. This is why remote debugging is so important to me/not checking that the pid exists locally because I'm using a gdb/gdbserver in a docker)
I think this is new in Version 0.9.2.
I've been working on understanding #78 and found out that using
processIdin yourlaunch.jsondoes not work on remote debugging (using gdbserver) if the pid number you use does not exist on the local machine (even though it does exist on the remote machine).For example:
{ "name": "C++ Attach", "type": "cppdbg", "request": "attach", "miDebuggerServerAddress": "myserver:6666", "program": "${workspaceRoot}/hello", "processId": "13467", "linux": { "MIMode": "gdb" }, "osx": { "MIMode": "lldb" }, "windows": { "MIMode": "gdb" } }Even though pid 13467 exist on myserver, it doesn't exist on my localhost, and so when I run the attach, I get
However if I make sure that pid number exists (via this trick), I get a little further, and get a different error (which existed in v0.9.1 too)
I still have to work around a lot of issues (highlighted in #78) to get remote debugging working with cpptools
End result, I can't do remote debugging by pid.
(Spoiler, my end goal is gdb debugging in a docker. This is why remote debugging is so important to me/not checking that the pid exists locally because I'm using a gdb/gdbserver in a docker)