diff --git a/src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs b/src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs index 3d8e04c31..90d20ec88 100644 --- a/src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs +++ b/src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs @@ -3,34 +3,34 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter { public class Scope { -// /** name of the scope (as such 'Arguments', 'Locals') */ -// name: string; + /// + /// Gets or sets the name of the scope (as such 'Arguments', 'Locals') + /// public string Name { get; set; } -// /** The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest. */ -// variablesReference: number; + /// + /// Gets or sets the variables of this scope can be retrieved by passing the + /// value of variablesReference to the VariablesRequest. + /// public int VariablesReference { get; set; } -// /** If true, the number of variables in this scope is large or expensive to retrieve. */ -// expensive: boolean; + /// + /// Gets or sets a boolean value indicating if number of variables in + /// this scope is large or expensive to retrieve. + /// public bool Expensive { get; set; } public static Scope Create(VariableScope scope) { - return new Scope - { + return new Scope { Name = scope.Name, - VariablesReference = scope.Id + VariablesReference = scope.Id, + // Temporary fix for #95 to get debug hover tips to work well at least for the local scope. + Expensive = (scope.Name != VariableContainerDetails.LocalScopeName) }; } }