Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Breakpoint.LocationType Property

Indicates the location type this breakpoint represents.

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

dbgBreakpointLocationType LocationType { get; }
/** @property */
dbgBreakpointLocationType get_LocationType ()

function get LocationType () : dbgBreakpointLocationType

Property Value

A dbgBreakpointLocationType value.

A Breakpoint can be set in a function, a file, a variable, or at a specific memory address.

The following example demonstrates how to use the LocationType 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 LocationType(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("LocationType 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); 

Community Additions

© 2015 Microsoft