Condividi tramite


Proprietà StackFrames.Parent

Ottiene l'oggetto padre diretto di una raccolta StackFrames.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

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

Valore proprietà

Tipo: EnvDTE.Debugger
Oggetto Debugger.

Esempi

Nell'esempio seguente viene illustrato l'utilizzare della proprietà Parent.

Per verificare la proprietà:

  1. Impostare un punto di interruzione nell'applicazione di destinazione.

  2. Eseguire l'applicazione di destinazione in modalità debug.

  3. Quando l'applicazione si interrompe al punto di interruzione, eseguire il componente aggiuntivo.

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

StackFrames Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione