Share via


Debugger.Parent Property

Gets the immediate parent object of a Debugger object.

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

Syntax

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

Property Value

Type: EnvDTE.DTE
A DTE object.

Remarks

The Parent property returns the immediate parent to the object.

Examples

The following example demonstrates how to use the Parent property.

To test this property:

  1. Open the target project and run the add-in.
public static void Parent(DTE dte)
{
    // Setup the 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("Parent Property Test");
    owp.Activate();
    EnvDTE.Debugger debugger = dte.Debugger;
    owp.OutputString("The name of the debugger parent: " + debugger.Parent.Name);
}
Shared Sub ParentProperty(ByRef dte As EnvDTE.DTE)
    MessageBox.Show("The name of the debugger parent: " + dte.Debugger.Parent.Name, _
                    "Debugger Test - Parent Property Test")
End Sub

.NET Framework Security

See Also

Reference

Debugger Interface

EnvDTE Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples