Debugger::Stop Method (Boolean)
Stops debugging, terminating, or detaching from all attached processes.
Assembly: EnvDTE (in EnvDTE.dll)
Parameters
- WaitForDesignMode
-
Type:
System::Boolean
Set to true if the debugging session should stop only when it reaches design mode. Set to false if you intend to stop debugging, but you need to perform other tasks in the macro even before the debugger enters Design mode.
Stop stops debugging and terminates the attached process. See for more information.03C68F95-AA96-481B-990E-467E065453A5
The following example demonstrates how to use the Stop method.
Note |
|---|
Macros are run on the main thread of Visual Studio. The following code does not work and the macro loops indefinitely, because the integrated development environment (IDE) never has a chance to enter Design mode. Instead, you should resort to a separate thread or pooling mechanism. |
' Bad Code Example. Sub StopDebuggingAndWaitForDesign DTE.Debugger.Stop(False) While DTE.Debugger.CurrentMode <> dbgDebugMode.dbgDesignMode System.Threading.Thread.Sleep(50) End While MsgBox("Debugger has been stopped")
End Sub
