From 44e2d4d52130286a1f7e2fba33f0fcc1cbe2d941 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 28 Oct 2021 13:15:04 -0400 Subject: [PATCH] package.json: add config to hide system goroutines in debug 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 Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- build/all.bash | 2 +- docs/debugging.md | 1 + docs/settings.md | 1 + package.json | 15 +++++++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/build/all.bash b/build/all.bash index 07539a3eca..120da2b930 100755 --- a/build/all.bash +++ b/build/all.bash @@ -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. diff --git a/docs/debugging.md b/docs/debugging.md index 4ed235ba9b..a8404b3b17 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -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.
|
_same as Launch_
| | `env` | Environment variables passed to the program.
|
_n/a_
| | `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths
(Default: `${workspaceFolder}/.env`)
|
_n/a_
| +| `hideSystemGoroutines` | Boolean value to indicate whether system goroutines should be hidden from call stack view.
(Default: `false`)
|
_same as Launch_
| | `host` | In legacy mode, this will only apply to remote-attach configurations, which will look for "dlv ... --headless --listen=:" 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=:" to ask it to launch/attach to the target process.
(Default: `"127.0.0.1"`)
|
_same as Launch_
| | `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.
| 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.
| | `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.

Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`
(Default: `"debugger"`)
|

_same as Launch_
| diff --git a/docs/settings.md b/docs/settings.md index 1e41a0e439..ab15c9381b 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -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.
Allowed Options: `legacy`, `dlv-dap`
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'.
Default: ``` {
"followPointers" :	true,
"maxArrayValues" : 64,
"maxStringLen" : 64,
"maxStructFields" : -1,
"maxVariableRecurse" : 1,
} ``` | +| `hideSystemGoroutines` | Boolean value to indicate whether system goroutines should be hidden from call stack view.
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.
Allowed Options: `debugger`, `gdbwire`, `lldbout`, `debuglineerr`, `rpc`, `dap`
Default: `"debugger"` | | `showGlobalVariables` | Boolean value to indicate whether global package variables should be shown in the variables pane or not.
Default: `false` | | `showLog` | Show log output from the delve debugger. Maps to dlv's `--log` flag.
Default: `false` | diff --git a/package.json b/package.json index 4eaa02d6b9..5ba4d75486 100644 --- a/package.json +++ b/package.json @@ -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." } } }, @@ -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." } } } @@ -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.",