Debugger.Parent 属性

获取 Debugger 对象的直接父对象。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

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

属性值

类型:EnvDTE.DTE
一个 DTE 对象。

备注

Parent 属性返回对象的直接父对象。

示例

下面的示例演示如何使用 Parent 属性。

测试此属性:

  1. 打开目标项目并运行外接程序。
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 安全性

请参阅

参考

Debugger 接口

EnvDTE 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例