CallStackFrame CallStackFrame CallStackFrame Class


A call stack item returned by the Get-PSCallStack cmdlet.

public sealed class CallStackFrame
type CallStackFrame = class
Public NotInheritable Class CallStackFrame


CallStackFrame(InvocationInfo) CallStackFrame(InvocationInfo) CallStackFrame(InvocationInfo)



FunctionName FunctionName FunctionName

The name of the function associated with this frame.

InvocationInfo InvocationInfo InvocationInfo

The InvocationInfo of the command

Position Position Position

The position information for the current position in the frame. Null if the frame is not associated with a script.

ScriptLineNumber ScriptLineNumber ScriptLineNumber

Line number of the current location, or 0 if the frame is not associated to a script

ScriptName ScriptName ScriptName

File name of the current location, or null if the frame is not associated to a script


GetFrameVariables() GetFrameVariables() GetFrameVariables()

Return a dictionary with the names and values of variables that are "local" to the frame.

GetScriptLocation() GetScriptLocation() GetScriptLocation()

Returns a formatted string containing the ScriptName and ScriptLineNumber

ToString() ToString() ToString()

ToString override.

Applies to