Compartir a través de


Breakpoint2.Tag Property

Definition

Sets or gets a user-defined string identifying this breakpoint.

public:
 property System::String ^ Tag { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ Tag { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(114)]
public string Tag { [System.Runtime.InteropServices.DispId(114)] get; [System.Runtime.InteropServices.DispId(114)] set; }
[<System.Runtime.InteropServices.DispId(114)>]
[<get: System.Runtime.InteropServices.DispId(114)>]
[<set: System.Runtime.InteropServices.DispId(114)>]
member this.Tag : string with get, set
Public Property Tag As String

Property Value

A string containing the breakpoint tag.

Implements

Tag
Attributes

Examples

The following example demonstrates how to use the Tag property.

public static void Tag(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("Tag property: ");  
    owp.Activate();  

    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;  
    owp.OutputString("HitCountTarget: " +  
                        debugger.Breakpoints.Item(1).HitCountTarget);  
    owp.OutputString("\nHitCountType: " +  
                        debugger.Breakpoints.Item(1).HitCountType);  
    owp.OutputString("\nLocationType: " +  
                        debugger.Breakpoints.Item(1).LocationType);  
    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);   
}  

Applies to