Skip to content

Commit df181c8

Browse files
committed
package.json: clarify format and precedence of env-setting debug attributes
Updates #2206 Change-Id: Ifd31119b0eafae6ea617ed5c7d405626e3720345 GitHub-Last-Rev: 4a6466c GitHub-Pull-Request: #2209 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/401974 Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Polina Sokolova <[email protected]>
1 parent e01cc4b commit df181c8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ Here is the list of attributes specific to Go debugging.
269269
| `cwd` | Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The `program` folder is used as the working directory if `cwd` is omitted or empty.<br/>(Default: `""`)<br/> | Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.<br/>(Default: `"${workspaceFolder}"`)<br/> |
270270
| `debugAdapter` | Select which debug adapter to use with this launch configuration.<br/><p>Allowed Values: `"legacy"`, `"dlv-dap"`<br/>(Default: `dlv-dap`)<br/> | <center>_same as Launch_</center>|
271271
| `dlvFlags` | Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.<br/> | <center>_same as Launch_</center>|
272-
| `env` | Environment variables passed to the program.<br/> | <center>_n/a_</center> |
273-
| `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths<br/> | <center>_n/a_</center> |
272+
| `env` | Environment variables passed to the launched debuggee program. Format as string key:value pairs. Merged with `envFile` and `go.toolsEnvVars` with precedence `env` > `envFile` > `go.toolsEnvVars`.<br/> | <center>_n/a_</center> |
273+
| `envFile` | Absolute path to a file containing environment variable definitions, formatted as string key=value pairs. Multiple files can be specified by provided an array of absolute paths. Merged with `env` and `go.toolsEnvVars` with precedence `env` > `envFile` > `go.toolsEnvVars`. <br/> | <center>_n/a_</center> |
274274
| `hideSystemGoroutines` | Boolean value to indicate whether system goroutines should be hidden from call stack view.<br/>(Default: `false`)<br/> | <center>_same as Launch_</center>|
275275
| `host` | 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: `"127.0.0.1"`)<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: `"127.0.0.1"`)<br/> |
276276
| `logDest` | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS.<br/> | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS.<br/> |

docs/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ Specifies the timeout for go test in ParseDuration format.
440440
Default: `"30s"`
441441
### `go.toolsEnvVars`
442442

443-
Environment variables that will be passed to the tools that run the Go tools (e.g. CGO_CFLAGS)
443+
Environment variables that will be passed to the tools that run the Go tools (e.g. CGO_CFLAGS) and debuggee process launched by Delve. Format as string key:value pairs. When debugging, merged with `envFile` and `env` values with precedence `env` > `envFile` > `go.toolsEnvVars`.
444444
### `go.toolsGopath`
445445

446446
Location to install the Go tools that the extension depends on if you don't want them in your GOPATH.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
},
670670
"env": {
671671
"type": "object",
672-
"description": "Environment variables passed to the program.",
672+
"description": "Environment variables passed to the launched debuggee program. Format as string key:value pairs. Merged with `envFile` and `go.toolsEnvVars` with precedence `env` > `envFile` > `go.toolsEnvVars`.",
673673
"default": {}
674674
},
675675
"substitutePath": {
@@ -736,7 +736,7 @@
736736
"items": {
737737
"type": "string"
738738
},
739-
"description": "Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths",
739+
"description": "Absolute path to a file containing environment variable definitions, formatted as string key=value pairs. Multiple files can be specified by provided an array of absolute paths. Merged with `env` and `go.toolsEnvVars` with precedence `env` > `envFile` > `go.toolsEnvVars`. ",
740740
"default": ""
741741
},
742742
"backend": {
@@ -1471,7 +1471,7 @@
14711471
"go.toolsEnvVars": {
14721472
"type": "object",
14731473
"default": {},
1474-
"description": "Environment variables that will be passed to the tools that run the Go tools (e.g. CGO_CFLAGS)",
1474+
"description": "Environment variables that will be passed to the tools that run the Go tools (e.g. CGO_CFLAGS) and debuggee process launched by Delve. Format as string key:value pairs. When debugging, merged with `envFile` and `env` values with precedence `env` > `envFile` > `go.toolsEnvVars`.",
14751475
"scope": "resource"
14761476
},
14771477
"go.gocodeFlags": {

0 commit comments

Comments
 (0)