Sdílet prostřednictvím


StackFrames.Parent – vlastnost

Získá bezprostřední nadřízený objekt StackFrames kolekce.

Obor názvů:  EnvDTE
Sestavení:  EnvDTE (v EnvDTE.dll)

Syntaxe

'Deklarace
ReadOnly Property Parent As Debugger
Debugger Parent { get; }
property Debugger^ Parent {
    Debugger^ get ();
}
abstract Parent : Debugger with get
function get Parent () : Debugger

Hodnota vlastnosti

Typ: EnvDTE.Debugger
Objekt Debugger.

Příklady

Následující příklad demonstruje použití Parent vlastnost.

Tato vlastnost testování:

  1. Nastavte zarážky v cílové aplikaci.

  2. Cílová aplikace spouštět v režimu ladění.

  3. Jakmile aplikace přestane na zarážku, spustit doplněk.

public static void StackFramesParent(DTE dte)
{
    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;
    MessageBox.Show("\nThe name of the current program: " + 
                    stackFrames.Parent.CurrentProgram.Name, 
                    "Stack Frames Parent Property Test");
}
Shared Sub StackFramesParent(ByRef dte As EnvDTE.DTE)
    Dim stackFrames As EnvDTE.StackFrames = dte.Debugger.CurrentThread.StackFrames
    MessageBox.Show("The name of the current program: " + _
                    stackFrames.Parent.CurrentProgram.Name, _
                    "Stack Frame Test - Parent Property")
End Sub

Zabezpečení rozhraní .NET Framework

Viz také

Referenční dokumentace

StackFrames Rozhraní

EnvDTE – obor názvů

Další zdroje

Postupy: Kompilace a spuštění příkladů kódu objektu automatizace