Breakpoint2.Children 属性

获取所有 Breakpoint2 子对象的集合。

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

语法

声明
ReadOnly Property Children As Breakpoints
    Get
Breakpoints Children { get; }
property Breakpoints^ Children {
    Breakpoints^ get ();
}
abstract Children : Breakpoints
function get Children () : Breakpoints

属性值

类型:EnvDTE.Breakpoints
一个 Breakpoints 集合。

实现

Breakpoint.Children

备注

如果断点没有子级,则返回 Nothing。

如果在设计模式下设置的挂起断点绑定到中断模式或运行模式下的特定应用程序实例,则会创建子级。

示例

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

测试此属性:

  1. 在目标应用程序中设置一个断点。

  2. 运行外接程序。

    断点子级的号码为零。

  3. 以调试模式运行目标应用程序。

  4. 当程序停在该断点处时,运行外接程序。

    子级号码为一。

public static void Children(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("Children Property Test");
    owp.Activate();

    //dte is a reference to the DTE2 object passed to you by the
    //OnConnection method that you implement when you create an Add-in.
    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
    owp.OutputString("Number of children: " + 
                        debugger.Breakpoints.Item(1).Children.Count.ToString());
}

.NET Framework 安全性

请参见

参考

Breakpoint2 接口

Children 重载

EnvDTE80 命名空间

其他资源

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