Freigeben über


Debugger3.DetachAll Method

Definition

Detaches from all attached programs.

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

Implements

Attributes

Examples

The following example shows how to use the DetachAll method.

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

    EnvDTE90.Debugger3 debugger = (EnvDTE90.Debugger3)dte.Debugger;  
    debugger.DetachAll();  
    owp.OutputString("Detached all processes.");  
}  
Sub DetachAll()  
    On Error Goto BadDetach  
    DTE2.Debugger.DetachAll()  
    Exit Sub  

    BadDetach:  
        MsgBox("Could not detach from all processes.")  
End Sub  

Remarks

DetachAll tries to detach from all attached programs. This operation can fail if attached process cannot be detached. For more information, see How to: Detach Programs.

Applies to