Skip to content

Commit

Permalink
package.json: add config to hide system goroutines in debug
Browse files Browse the repository at this point in the history
This change includes the configuration for hiding the system
goroutines in a debug session. It also sets the default value in
go nightly to true.

The setting of go.useLanguage server in nightly to true is also
removed by this change, since it is not the default everywhere.

Change-Id: I43b45b7743e6b3b31a41da1462e50669846b0f0d
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/359402
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
  • Loading branch information
suzmue committed Oct 28, 2021
1 parent 18e3fca commit 44e2d4d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/all.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ prepare_nightly() {
.displayName="Go Nightly" |
.publisher="golang" |
.description="Rich Go language support for Visual Studio Code (Nightly)" |
.contributes.configuration.properties."go.useLanguageServer".default=true
.contributes.configuration.properties."go.delveConfig.hideSystemGoroutines".default=true
') > /tmp/package.json && mv /tmp/package.json package.json

# Replace CHANGELOG.md with CHANGELOG.md + Release commit info.
Expand Down
1 change: 1 addition & 0 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ Here is the list of attributes specific to Go debugging.
| `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>|
| `env` | Environment variables passed to the program.<br/> | <center>_n/a_</center> |
| `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths<br/>(Default: `${workspaceFolder}/.env`)<br/> | <center>_n/a_</center> |
| `hideSystemGoroutines` | Boolean value to indicate whether system goroutines should be hidden from call stack view.<br/>(Default: `false`)<br/> | <center>_same as Launch_</center>|
| `host` | In legacy mode, this will only apply to remote-attach configurations, which will look for "dlv ... --headless --listen=<host>:<port>" server started externally. In dlv-dap mode (which does not yet support remote-attach), this will apply to all other configurations. 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/> | <center>_same as Launch_</center>|
| `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/> |
| `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>|
Expand Down
1 change: 1 addition & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Delve settings that applies to all debugging sessions. Debug configuration in th
| `debugAdapter` | Select which debug adapter to use by default. This is also used for choosing which debug adapter to use when no launch.json is present and with codelenses. <br/> Allowed Options: `legacy`, `dlv-dap` <br/> Default: `"dlv-dap"` |
| `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. |
| `dlvLoadConfig` | LoadConfig describes to delve, how to load values from target's memory. Ignored by 'dlv-dap'. <br/> Default: ``` { <pre>"followPointers" : true,<br/>"maxArrayValues" : 64,<br/>"maxStringLen" : 64,<br/>"maxStructFields" : -1,<br/>"maxVariableRecurse" : 1,</pre>} ``` |
| `hideSystemGoroutines` | Boolean value to indicate whether system goroutines should be hidden from call stack view. <br/> Default: `false` |
| `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details. <br/> Allowed Options: `debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`, `dap` <br/> Default: `"debugger"` |
| `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not. <br/> Default: `false` |
| `showLog` | Show log output from the delve debugger. Maps to dlv's `--log` flag. <br/> Default: `false` |
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,11 @@
"type": "boolean",
"default": false,
"description": "Boolean value to indicate whether register variables should be shown in the variables pane or not."
},
"hideSystemGoroutines": {
"type": "boolean",
"default": false,
"description": "Boolean value to indicate whether system goroutines should be hidden from call stack view."
}
}
},
Expand Down Expand Up @@ -981,6 +986,11 @@
"type": "boolean",
"default": false,
"description": "Boolean value to indicate whether register variables should be shown in the variables pane or not."
},
"hideSystemGoroutines": {
"type": "boolean",
"default": false,
"description": "Boolean value to indicate whether system goroutines should be hidden from call stack view."
}
}
}
Expand Down Expand Up @@ -1837,6 +1847,11 @@
"default": false,
"description": "Boolean value to indicate whether register variables should be shown in the variables pane or not."
},
"hideSystemGoroutines": {
"type": "boolean",
"default": false,
"description": "Boolean value to indicate whether system goroutines should be hidden from call stack view."
},
"showLog": {
"type": "boolean",
"description": "Show log output from the delve debugger. Maps to dlv's `--log` flag.",
Expand Down

0 comments on commit 44e2d4d

Please sign in to comment.