forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGet-PSCallStack.cs
More file actions
27 lines (25 loc) · 861 Bytes
/
Copy pathGet-PSCallStack.cs
File metadata and controls
27 lines (25 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Management.Automation;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// This class implements Get-PSCallStack.
/// </summary>
[Cmdlet(VerbsCommon.Get, "PSCallStack", HelpUri = "http://go.microsoft.com/fwlink/?LinkID=113326")]
[OutputType(typeof(CallStackFrame))]
public class GetPSCallStackCommand : PSCmdlet
{
/// <summary>
/// Get the call stack
/// </summary>
protected override void ProcessRecord()
{
foreach (CallStackFrame frame in Context.Debugger.GetCallStack())
{
WriteObject(frame);
}
}
}
}