Game Development Reference
In-Depth Information
There are many occasions, however, where you don't want to continue execution
in this way. Instead, you want to step execution over the lines of code, line by line,
evaluating each line as it progresses and examining the program flow to see how
variables change and are affected by statements. The step mode effectively lets
you observe the program flow as it happens. There are three main kinds of steps
in debugging: step over, step into, and step out. Step over instructs the debugger
to move to the next line of code and then to pause again, awaiting your inspection
as though the next line were a new breakpoint. If an external function call is
encountered in the next line, the debugger would invoke the function as usual and
then step to the next line without stepping into the function. In this way, the function
is "stepped over". The function still happens, but it happens in the continue mode,
and the next step or breakpoint is set in the next line after the function. To step over,
press F10 , choose the Step Over command in Run from the application menu, or
press the Step Over button in the MonoDevelop toolbar, as shown here:
Stepping over code moves execution to the next statement without stepping into an external function
If an external function call is encountered, the Step Into ( F11 ) command allows
debugging to enter this function. This effectively sets the next breakpoint in the first
line of the entered function that allows debugging to resume in the next step. This
can be useful if you need to observe how many functions are working together. If, at
any point, you want to exit the entered function by moving it forward in the continue
mode, you could use the Step Out ( Shift + F11 ) command, and the execution would
resume in the next line in the outer function.
 
Search WWH ::




Custom Search