Skip to content

Commit 557e7a8

Browse files
committed
Remove unused stackFrameId argument
1 parent 7e4931b commit 557e7a8

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,8 @@ public VariableDetailsBase[] GetVariables(int variableReferenceId)
320320
/// walk the cached variable data for the specified stack frame.
321321
/// </summary>
322322
/// <param name="variableExpression">The variable expression string to evaluate.</param>
323-
/// <param name="stackFrameId">The ID of the stack frame in which the expression should be evaluated.</param>
324323
/// <returns>A VariableDetailsBase object containing the result.</returns>
325-
public VariableDetailsBase GetVariableFromExpression(string variableExpression, int stackFrameId)
324+
public VariableDetailsBase GetVariableFromExpression(string variableExpression)
326325
{
327326
// NOTE: From a watch we will get passed expressions that are not naked variables references.
328327
// Probably the right way to do this would be to examine the AST of the expr before calling
@@ -517,14 +516,12 @@ public async Task<string> SetVariableAsync(int variableContainerReferenceId, str
517516
/// PowerShellContext.
518517
/// </summary>
519518
/// <param name="expressionString">The expression string to execute.</param>
520-
/// <param name="stackFrameId">The ID of the stack frame in which the expression should be executed.</param>
521519
/// <param name="writeResultAsOutput">
522520
/// If true, writes the expression result as host output rather than returning the results.
523521
/// In this case, the return value of this function will be null.</param>
524522
/// <returns>A VariableDetails object containing the result.</returns>
525523
public async Task<VariableDetails> EvaluateExpressionAsync(
526524
string expressionString,
527-
int stackFrameId,
528525
bool writeResultAsOutput)
529526
{
530527
var command = new PSCommand().AddScript(expressionString);

src/PowerShellEditorServices/Services/DebugAdapter/Handlers/DebugEvaluateHandler.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation.
1+
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

44
using System;
@@ -61,16 +61,14 @@ public async Task<EvaluateResponseBody> Handle(EvaluateRequestArguments request,
6161
if (_debugContext.IsStopped)
6262
{
6363
// First check to see if the watch expression refers to a naked variable reference.
64-
result =
65-
_debugService.GetVariableFromExpression(request.Expression, request.FrameId);
64+
result = _debugService.GetVariableFromExpression(request.Expression);
6665

6766
// If the expression is not a naked variable reference, then evaluate the expression.
6867
if (result == null)
6968
{
7069
result =
7170
await _debugService.EvaluateExpressionAsync(
7271
request.Expression,
73-
request.FrameId,
7472
isFromRepl).ConfigureAwait(false);
7573
}
7674
}

0 commit comments

Comments
 (0)