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 all commits
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
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,25 @@
],
"description": "Delve Api Version to use. Default value is 2.",
"default": 2
},
"showGlobalVariables": {
"type": "boolean",
"description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not.",
"default": true
}
},
"default": {
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1
},
"apiVersion": 2,
"showGlobalVariables": true
},
"description": "Delve settings that applies to all debugging sessions. Debug configuration in the launch.json file will override these values.",
"scope": "resource"
},
"go.alternateTools": {
Expand Down
2 changes: 1 addition & 1 deletion src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ class GoDebugSession extends LoggingDebugSession {
private logLevel: Logger.LogLevel = Logger.LogLevel.Error;
private readonly initdone = 'initdone·';

private showGlobalVariables: boolean = true;
private showGlobalVariables: boolean = false;
public constructor(debuggerLinesStartAt1: boolean, isServer: boolean = false) {
super('', debuggerLinesStartAt1, isServer);
this._variableHandles = new Handles<DebugVariable>();
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