Stop (statement)

Syntax Stop
Description Suspends execution of the current script, returning control to a debugger if one is present. If a debugger is not present, this command will have the same effect as End .
Example The Stop statement can be used for debugging. In this example, it is used to stop execution when Z is randomly set to 0.
Sub Main()
  For x = 1 To 10
    z = Random(0,10)
    If z = 0 Then Stop
    y = x / z
  Next x
End Sub
See Also Exit For (statement); Exit Do (statement); Exit Function (statement); Exit Sub (statement); End (statement).