Skip to content

Commit 653503d

Browse files
committed
Either use FirstVariableId or get rid of it. We'll continue to use it for now.
1 parent aa11be0 commit 653503d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/PowerShellEditorServices/Debugging/DebugService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ private async Task ClearBreakpointsInFile(ScriptFile scriptFile)
306306

307307
private async Task FetchStackFramesAndVariables()
308308
{
309-
// Avoid using 0 as it indicates a variable node with no children.
310-
this.nextVariableId = 1;
309+
this.nextVariableId = VariableDetailsBase.FirstVariableId;
311310
this.variables = new List<VariableDetailsBase>();
312311

313312
// Create a dummy variable for index 0, should never see this.

src/PowerShellEditorServices/Debugging/VariableDetailsBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ namespace Microsoft.PowerShell.EditorServices
1212
public abstract class VariableDetailsBase
1313
{
1414
/// <summary>
15-
/// Provides a constant that is used as the starting variable ID for all
15+
/// Provides a constant that is used as the starting variable ID for all.
16+
/// Avoid 0 as it indicates a variable node with no children.
1617
/// variables.
1718
/// </summary>
1819
public const int FirstVariableId = 1;

0 commit comments

Comments
 (0)