Stop Statement (Visual Basic)
Updated: July 20, 2015
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
You can place
Stop statements anywhere in procedures to suspend execution. Using the
Stop statement is similar to setting a breakpoint in the code.
Stop statement suspends execution, but unlike
End, it does not close any files or clear any variables, unless it is encountered in a compiled executable (.exe) file.
This example uses the
Stop statement to suspend execution for each iteration through the
Dim i As Integer For i = 1 To 10 Debug.WriteLine(i) ' Stop during each iteration and wait for user to resume. Stop Next i