Udpate remote examples for docker/cpptools

This commit is contained in:
Ben Jackson 2021-04-04 15:13:46 +01:00
commit d12c0897f2

View file

@ -765,6 +765,8 @@ and have to tell cpptools a few more options.
"remote": { "remote": {
"host": "${host}", "host": "${host}",
"account": "${account}", "account": "${account}",
// or, alternatively "container": "${ContainerID}"
"runCommand": [ "runCommand": [
"gdbserver", "gdbserver",
"--once", "--once",
@ -772,14 +774,19 @@ and have to tell cpptools a few more options.
"--disable-randomisation", "--disable-randomisation",
"0.0.0.0:${port}", "0.0.0.0:${port}",
"%CMD%" "%CMD%"
} },
"delay": "1000m" // optional
}, },
"attach": { "attach": {
"remote": { "remote": {
"host": "${host}", "host": "${host}",
"account": "${account}", "account": "${account}",
// or, alternatively "container": "${ContainerID}"
"pidCommand": [ "pidCommand": [
"/path/to/secret/script/GetPIDForService", "${ServiceName}" // e.g. "/path/to/secret/script/GetPIDForService", "${ServiceName}"
// or...
"pgrep", "executable"
], ],
"attachCommand": [ "attachCommand": [
"gdbserver", "gdbserver",
@ -796,12 +803,13 @@ and have to tell cpptools a few more options.
// application never attaches, try using the following to manually // application never attaches, try using the following to manually
// force the trap signal. // force the trap signal.
// //
"initCompleteCommand": [ // "initCompleteCommand": [
"kill", // "kill",
"-TRAP", // "-TRAP",
"%PID%" // "%PID%"
] // ]
} },
"delay": "1000m" // optional
} }
} }
}, },
@ -811,22 +819,27 @@ and have to tell cpptools a few more options.
"remote-cmdLine": [ "/path/to/the/remote/executable", "args..." ], "remote-cmdLine": [ "/path/to/the/remote/executable", "args..." ],
"remote-request": "launch", "remote-request": "launch",
"configuration": { "configuration": {
"request": "attach", // yes, attach! "request": "launch",
"program": "/path/to/the/local/executable", "program": "/path/to/the/local/executable",
"cwd": "${workspaceRoot},
"MIMode": "gdb", "MIMode": "gdb",
"miDebuggerAddress": "${host}:${port}" "miDebuggerServerAddress": "${host}:${port}",
"sourceFileMap#json": "{\"${RemoteRoot}\": \"${workspaceRoot}\"}"
} }
}, },
"remote attach": { "remote attach": {
"adapter": "cpptools-remote", "adapter": "cpptools-remote",
"remote-request": "attach", "remote-request": "attach",
"configuration": { "configuration": {
"request": "attach", "request": "launch",
"program": "/path/to/the/local/executable", "program": "/path/to/the/local/executable",
"cwd": "${workspaceRoot},
"MIMode": "gdb", "MIMode": "gdb",
"miDebuggerAddress": "${host}:${port}" "miDebuggerServerAddress": "${host}:${port}",
"sourceFileMap#json": "{\"${RemoteRoot}\": \"${workspaceRoot}\"}"
}
} }
} }
} }