You can add manual break points to your code by using the break()
function to invoke the Debugger.
Syntax:
break()
This function breaks the execution of the code and invokes the Debugger allowing you to see the state of your variables at that point.
FOR EXAMPLE:
for i = 1 to 10000 do ( theRandom = random 1 100 if theRandom == 50 do break() )
In this simple example, the Debugger will be called if the random value generated within the loop generates the integer 50.
Some parts of the code are "locked" and cannot be stopped from executing.
One of the "locks" that prevents breaking into the debugger is one associated with arrays. When you are iterating across an array using the FOR statement, the lock is set.
FOR EXAMPLE:
for i in #(1,2) do break()
The result will be Break attempt timed out
printed to the Debugger Output without a successful break.