Debugger2.Parent 屬性

取得 Debugger2 物件 (DTE2) 的直接上層父物件。

命名空間:  EnvDTE80
組件:  EnvDTE80 (在 EnvDTE80.dll 中)

語法

'宣告
ReadOnly Property Parent As DTE
    Get
DTE Parent { get; }
property DTE^ Parent {
    DTE^ get ();
}
abstract Parent : DTE
function get Parent () : DTE

屬性值

型別:EnvDTE.DTE
DTE 物件。

實作

Debugger.Parent

備註

Parent 屬性將直接上層父代傳回給該物件。

範例

下列範例示範如何使用 Parent 屬性。

若要測試這個屬性:

  1. 開啟目標專案並執行增益集。
public static void Parent(EnvDTE80.DTE2 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("Parent Property 
    Test");
    owp.Activate();

    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
    owp.OutputString("The name of the debugger parent: " + 
                     debugger.Parent.Name);
}

.NET Framework 安全性

請參閱

參考

Debugger2 介面

Parent 多載

EnvDTE80 命名空間