Replies: 2 comments 4 replies
-
Use "request": "launch" with "customLaunchSetupCommands": [] https://code.visualstudio.com/docs/cpp/launch-json-reference#_customlaunchsetupcommands With this configuration, the extension is running in "launch" mode and it will kill the process if you STOP the debugger. Instead, use "-exec detach" in the debug console. It would be great if they add a "customAttachSetupCommands" or something like that... |
Beta Was this translation helpful? Give feedback.
-
Thanks for the heads up 👍 {
name: "GDB attach",
type: "cppdbg",
request: "attach",
miDebuggerPath: bin,
MIMode: "gdb",
useExtendedRemote: true,
setupCommands: [
{ text: `target extended-remote ${address}` },
{ text: `source ${script_path}` },
],
program: debugLine[1],
processId: +debugLine[2],
} And it work like a charm ! |
Beta Was this translation helpful? Give feedback.
-
I'm currently trying to connect VSCode to a running (and executing) GDB server,
So I don't want any
exec
step executed by VSCode.here is my launch.json
Despite my attempts with
launchCompleteCommand:None
andstopAtConnect: true
, VSCode tries to run a file-exec-and-symbols which fail in my environement.I also tried a "request:lauch" kind of run, which get stuck without any logs.
How to prevent this unwanted command to be run by VSCode GDB Client ?
Beta Was this translation helpful? Give feedback.
All reactions