Share via


StackFrame.Arguments Property

Gets a collection of expressions representing the arguments passed to this frame.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property Arguments As Expressions
'Usage
Dim instance As StackFrame 
Dim value As Expressions 

value = instance.Arguments
Expressions Arguments { get; }
property Expressions^ Arguments {
    Expressions^ get ();
}
function get Arguments () : Expressions

Property Value

Type: EnvDTE.Expressions
An Expressions collection.

Remarks

Arguments returns a collection of Expressions representing the arguments passed to this frame.

Examples

The following example demonstrates how to use the Arguments property.

To test this property:

  1. In your target application, set a breakpoint inside the method with multiple input parameters.

  2. Run the target application in the debug mode.

  3. When the application stops on the breakpoint, run the add-in.

public static void Arguments(DTE dte)
{
    // Setup debug Output window.
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
    w.Visible = true;
    OutputWindow ow = (OutputWindow)w.Object;
    OutputWindowPane owp = ow.OutputWindowPanes.Add("Arguments Property Test");
    owp.Activate();

    EnvDTE.Expressions expressions = dte.Debugger.CurrentStackFrame.Arguments;
    foreach(EnvDTE.Expression exp in expressions)
        owp.OutputString("\nExpression: " + exp.Name + " = " + exp.Value);
}
Shared Sub Arguments(ByRef dte As EnvDTE.DTE)
    Dim str As String
    Dim exps As EnvDTE.Expressions = dte.Debugger.CurrentStackFrame.Arguments
    For Each exp As EnvDTE.Expression In exps
        str += vbCrLf + vbTab + "Expression: " + _
               exp.Name + " = " + exp.Value.ToString()
    Next
    MessageBox.Show(str, "Stack Frame Test - Arguments Property")
End Sub

.NET Framework Security

See Also

Reference

StackFrame Interface

StackFrame Members

EnvDTE Namespace