Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Added showGlobalVariables as a workspace level parameter #2351

Merged
merged 5 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,11 @@
"type": "number",
"description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields",
"default": -1
},
"showGlobalVariables": {
"type": "boolean",
"description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not.",
"default": true
}
},
"description": "LoadConfig describes to delve, how to load values from target's memory",
Expand All @@ -1233,7 +1238,8 @@
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1
"maxStructFields": -1,
"showGlobalVariables": false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to pull showGlobalVariables one level up.
The properties in LoadConfig is a 1:1 to what is at https://github.com/go-delve/delve/blob/4c9a72e486f1f0d0c90ecede8415a871dced8117/service/api/conversions.go#L276

}
},
"apiVersion": {
Expand Down
3 changes: 3 additions & 0 deletions src/goDebugConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr
if (!debugConfiguration.hasOwnProperty('dlvLoadConfig') && dlvConfig.hasOwnProperty('dlvLoadConfig')) {
debugConfiguration['dlvLoadConfig'] = dlvConfig['dlvLoadConfig'];
}
if (!debugConfiguration.hasOwnProperty('showGlobalVariables') && dlvConfig.hasOwnProperty('showGlobalVariables')) {
debugConfiguration['showGlobalVariables'] = dlvConfig['showGlobalVariables'];
}

debugConfiguration['dlvToolPath'] = getBinPath('dlv');
if (!path.isAbsolute(debugConfiguration['dlvToolPath'])) {
Expand Down