monkey2
monkey2 copied to clipboard
Stepping forward in the debugger doesn't step into loops.
As the title suggests, when the 'step forward' button is pressed, and a loop is present, the loop will not be stepped into, but instead, stepped over.
I don't know of any debugger that works like this, and I'm wondering if this was an intentional decision. Even Monkey 1 would step into a loop if its conditions are met. Likewise, Visual Studio and co. do the same thing; step into the loop if it executes.
In other words, most debuggers define the concept of 'step over' as "Step over a function call, and any work performed to process the arguments", whereas Monkey 2 just steps over any scope, period.
Thoughts?
As an example, take this program that prints 10 numbers:
Function Main()
Print("Numbers:")
DebugStop()
For Local i:= 0 Until 10
Print(i)
Next
Print("Done.")
End
If you execute that in Monkey 1, it'll stop at each call to 'Print' as expected. Monkey 2, on the other hand, steps over the entire loop.