Sdílet prostřednictvím


Breakpoint.Delete Method

Definition

Deletes the breakpoint.

public:
 void Delete();
public:
 void Delete();
void Delete();
[System.Runtime.InteropServices.DispId(1)]
public void Delete ();
[<System.Runtime.InteropServices.DispId(1)>]
abstract member Delete : unit -> unit
Public Sub Delete ()
Attributes

Examples

The following example demonstrates how to use the Delete method.

public static void Delete(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("Delete Method Test: ");  
    owp.Activate();  

    EnvDTE.Debugger debugger = (EnvDTE.Debugger)dte.Debugger;  
    owp.OutputString("\nThe breakpoint to delete: " +   
                     debugger.Breakpoints.Item(1).Name);  
    debugger.Breakpoints.Item(1).Delete();  
    if(debugger.Breakpoints.Count == 0)  
        owp.OutputString("\nBreakpoint is deleted.");  
}  
Shared Sub ClearAllBreakpoints(ByRef dte As EnvDTE.DTE)  
    For Each bp As EnvDTE.Breakpoint In dte.Debugger.Breakpoints  
        bp.Delete()  
    Next  
End Sub  

Applies to