Skip to content

Commit 482492d

Browse files
aarzilligopherbot
authored andcommitted
extension/src: document delve's outputMode parameter
Update the launch.json schema described in package.json to document the missing outputMode parameter. For go-delve/delve#3523 Change-Id: I602ca3b4c321369769a51e840829e1c48ce4e63b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/753000 Reviewed-by: Hongxiang Jiang <hxjiang@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Madeline Kalil <mkalil@google.com> Auto-Submit: Madeline Kalil <mkalil@google.com>
1 parent 7360da7 commit 482492d

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

docs/debugging.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ Here is the list of attributes specific to Go debugging.
461461
| `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.<br/><p>Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`<br/>(Default: `"debugger"`)<br/> | <center>_same as Launch_</center>|
462462
| `mode` | One of `auto`, `debug`, `test`, `exec`, `replay`, `core`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.<br/><p>Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`, `"replay"`, `"core"`<br/>(Default: `auto`)<br/> | Indicates local or remote debugging. Local is similar to the `dlv attach` command, remote - to `dlv connect`<br/><p>Allowed Values: `"local"`, `"remote"`<br/>(Default: `local`)<br/> |
463463
| `output` | Output path for the binary of the debugee.<br/>(Default: `"debug"`)<br/> | <center>_n/a_</center> |
464+
| `outputMode` | When set to 'remote' captures the target program's stdout and stderr and transfers it to the client via DAP protocol's output events.<br/><p>Allowed Values: `"local"`, `"remote"`<br/>(Default: `local`)<br/> | <center>_n/a_</center> |
464465
| `port` | When applied to remote-attach configurations, will look for "dlv ... --headless --listen=<host>:<port>" server started externally. In dlv-dap mode this will apply to all other configurations as well. The extension will try to connect to an external server started with "dlv dap --listen=<host>:<port>" to ask it to launch/attach to the target process.<br/>(Default: `2345`)<br/> | When applied to remote-attach configurations, will look for "dlv ... --headless --listen=<host>:<port>" server started externally. In dlv-dap mode, this will apply to all other configurations as well. The extension will try to connect to an external server started with "dlv dap --listen=<host>:<port>" to ask it to launch/attach to the target process.<br/>(Default: `2345`)<br/> |
465466
| `processId` | <center>_n/a_</center> | <br/><p><b>Option 1:</b> Use process picker to select a process to attach, or Process ID as integer.<br/><p>Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`<br/><br/><p><b>Option 2:</b> Attach to a process by name. If more than one process matches the name, use the process picker to select a process.<br/><br/><p><b>Option 3:</b> The numeric ID of the process to be debugged. If 0, use the process picker to select a process.<br/><br/>(Default: `0`)<br/> |
466467
| `program` | Path to the program folder (or any go file within that folder) when in `debug` or `test` mode, and to the pre-built binary file to debug in `exec` mode. If it is not an absolute path, the extension interprets it as a workspace relative path.<br/>(Default: `"${workspaceFolder}"`)<br/> | <center>_n/a_</center> |

extension/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,14 @@
875875
"description": "(Experimental) Debug with elevated permissions (on Unix). It requires `integrated` or `external` console modes and is ignored in remote debugging.",
876876
"type": "boolean"
877877
},
878+
"outputMode": {
879+
"default": "local",
880+
"description": "When set to 'remote' captures the target program's stdout and stderr and transfers it to the client via DAP protocol's output events.",
881+
"enum": [
882+
"local",
883+
"remote"
884+
]
885+
},
878886
"stdinFrom": {
879887
"type": "string",
880888
"default": "",

extension/src/debugAdapter/goDebug.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ interface LaunchRequestArguments extends DebugProtocol.LaunchRequestArguments {
309309
// and send the information to DA using the 'env' property.
310310
envFile?: string | string[];
311311

312+
outputMode?: string;
313+
312314
stdinFrom?: string;
313315
stdoutTo?: string;
314316
stderrTo?: string;

0 commit comments

Comments
 (0)