Debugger.DetachAll Method
Detaches from all attached programs.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub DetachAll
void DetachAll()
void DetachAll()
abstract DetachAll : unit -> unit
function DetachAll()
Remarks
DetachAll attempts to detach from all attached programs. This operation can fail if any attached process cannot be detached. See <PAVE OVER> How to: Detach All Processes for more information.
Examples
The following example demonstrates how to use the DetachAll method.
To test this method:
Use the infinite loop in the target application code.
Run the target application in the debug mode.
Run the add-in.
The debugger is detached from the target application.
public static void DetachAll(DTE dte)
{
// Setup the 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();
dte.Debugger.DetachAll();
owp.OutputString("Detached all processes.");
}
Shared Sub DetachAll(ByRef dte As EnvDTE.DTE)
dte.Debugger.DetachAll()
MessageBox.Show("Detached all processes.", "Debugger Test - DetachAll Test")
End Sub
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.