Skip to content

Partial fix for issue 95 - set all scopes but Local as expensive. #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
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
30 changes: 15 additions & 15 deletions src/PowerShellEditorServices.Protocol/DebugAdapter/Scope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/// <summary>
/// Gets or sets the name of the scope (as such 'Arguments', 'Locals')
/// </summary>
public string Name { get; set; }

// /** The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest. */
// variablesReference: number;
/// <summary>
/// Gets or sets the variables of this scope can be retrieved by passing the
/// value of variablesReference to the VariablesRequest.
/// </summary>
public int VariablesReference { get; set; }

// /** If true, the number of variables in this scope is large or expensive to retrieve. */
// expensive: boolean;
/// <summary>
/// Gets or sets a boolean value indicating if number of variables in
/// this scope is large or expensive to retrieve.
/// </summary>
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)
};
}
}
Expand Down