Export (0) Print
Expand All

Breakpoint.HitCountType Property

Describes how to interpret a hit count.

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

dbgHitCountType HitCountType { get; }

Property Value

Type: EnvDTE.dbgHitCountType
A dbgHitCountType value.

This describes how to interpret a hit count. Specifies when to stop on a breakpoint depending on the type.

The following example demonstrates how to use the HitCountType property.

To test this property:

  1. Set a breakpoint in the target application.

  2. Set various breakpoint properties in Properties/Hit Count Dialog Box.

  3. Run the add-in.

public static void HitCountType(DTE 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("HitCountType Property Test: ");

    // dte is a reference to the DTE object passed to you by the
    // OnConnection method that you implement when you create an add-in.
    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;
    owp.OutputString("HitCountTarget: " + 
    owp.OutputString("\nHitCountType: " + 
    owp.OutputString("\nLocationType: " + 
    owp.OutputString("\nName: " + debugger.Breakpoints.Item(1).Name);
    debugger.Breakpoints.Item(1).Tag = "My Breakpoint";
    owp.OutputString("\nTag: " + debugger.Breakpoints.Item(1).Tag);
    owp.OutputString("\nType: " + debugger.Breakpoints.Item(1).Type); 

© 2015 Microsoft