File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
src/PowerShellEditorServices/Services/DebugAdapter Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -700,17 +700,9 @@ private async Task<VariableContainerDetails> FetchVariableContainerAsync(string
700
700
return scopeVariableContainer ;
701
701
}
702
702
703
- private bool AddToAutoVariables ( PSObject psvariable , string scope )
703
+ // TODO: This function needs explanation, thought, and improvement.
704
+ private bool AddToAutoVariables ( PSObject psvariable )
704
705
{
705
- if ( ( scope == VariableContainerDetails . GlobalScopeName )
706
- || ( scope == VariableContainerDetails . ScriptScopeName ) )
707
- {
708
- // We don't A) have a good way of distinguishing built-in from user created variables
709
- // and B) globalScopeVariables.Children.ContainsKey() doesn't work for built-in variables
710
- // stored in a child variable container within the globals variable container.
711
- return false ;
712
- }
713
-
714
706
string variableName = psvariable . Properties [ "Name" ] . Value as string ;
715
707
object variableValue = psvariable . Properties [ "Value" ] . Value ;
716
708
@@ -831,7 +823,7 @@ private async Task FetchStackFramesAsync(string scriptNameOverride)
831
823
var variableDetails = new VariableDetails ( psVarName , psVarValue ) { Id = nextVariableId ++ } ;
832
824
variables . Add ( variableDetails ) ;
833
825
834
- if ( AddToAutoVariables ( new PSObject ( entry . Value ) , scope : null ) )
826
+ if ( AddToAutoVariables ( new PSObject ( entry . Value ) ) )
835
827
{
836
828
autoVariables . Children . Add ( variableDetails . Name , variableDetails ) ;
837
829
}
You can’t perform that action at this time.
0 commit comments