The .Arguments property on the System.Management.Automation.CallStackFrame instances output by Get-PSCallStack is a script property that - I presume - is meant to reflect the arguments passed.
The property isn't documented, but it seems to contain no useful information, seemingly containing $null in any non-global scope.
While you con obtain argument information via the type-native .InvocationInfo property, I assume there is a purpose to .Arguments that it currently doesn't fulfill.
Steps to reproduce
& { (Get-PSCallStack)[0].Arguments } 'foo' | Should -match 'foo'
Expected behavior
The test should pass.
Actual behavior
The test fails, because .Arguments is $null:
Expected regular expression 'foo' to match $null, but it did not match.
Environment data
PowerShell Core 7.0.0-preview.6
The
.Argumentsproperty on theSystem.Management.Automation.CallStackFrameinstances output byGet-PSCallStackis a script property that - I presume - is meant to reflect the arguments passed.The property isn't documented, but it seems to contain no useful information, seemingly containing
$nullin any non-global scope.While you con obtain argument information via the type-native
.InvocationInfoproperty, I assume there is a purpose to.Argumentsthat it currently doesn't fulfill.Steps to reproduce
Expected behavior
The test should pass.
Actual behavior
The test fails, because
.Argumentsis$null:Environment data