Process.Terminate Method
Terminates this process.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
Sub Terminate ( _
WaitForBreakOrEnd As Boolean _
)
void Terminate(
bool WaitForBreakOrEnd
)
void Terminate(
[InAttribute] bool WaitForBreakOrEnd
)
abstract Terminate :
WaitForBreakOrEnd:bool -> unit
function Terminate(
WaitForBreakOrEnd : boolean
)
Parameters
WaitForBreakOrEnd
Type: System.BooleanSet to true if the debugging session should stop only when it reaches a break or the end. Set to false if you intend to stop debugging, but you have to perform other tasks in the macro before the debugger breaks or ends. For more information, see Breaking Execution.
Examples
The following example demonstrates how to use the Terminate method.
To test this method
Run the target application in the debug mode. Make sure that the application contains an infinite loop.
Set the breakpoint inside the infinite loop.
Run the add-in.
public static void Terminate(DTE dte)
{
EnvDTE.Processes processes = dte.Debugger.DebuggedProcesses;
processes.Item(1).Terminate(true);
}
Shared Sub TerminateMethod(ByRef dte As EnvDTE.DTE)
Dim processes As EnvDTE.Processes = dte.Debugger.DebuggedProcesses
processes.Item(1).Terminate(True)
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.