Type: Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/myapp
"miDebuggerServerAddress": "myremotehost",
"runtimeArgs": [
"--hello"
],
"args": [
"--hello"
],
"stopAtEntry": false,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": true,
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "gdb"
},
"windows": {
"MIMode": "gdb"
}
}
]
}
@edwinchenloo This is expected behavior. We don't pass args because gdbserver's command line is where those arguments would come from.
In that scenario all you are doing is connecting to a remote debug session, not passing additional debug parameters.
Per gdbserver's man page, it says the usage for the command is:
gdbserver comm prog [args...]
To use the server, you log on to the target system, and run the gdbserver program. You must tell it (a) how to
communicate with GDB, (b) the name of your program, and (c) its arguments. The general syntax is:
target> gdbserver <comm> <program> [<args> ...]
So the args need to be configured on the gdbserver command.
Most helpful comment
@edwinchenloo This is expected behavior. We don't pass args because
gdbserver's command line is where those arguments would come from.In that scenario all you are doing is connecting to a remote debug session, not passing additional debug parameters.
Per
gdbserver'smanpage, it says the usage for the command is:So the
argsneed to be configured on thegdbservercommand.