You can play back scripts to execute one line at a time while in debug mode. Known as
stepping, this allows a tester to trace through code during playback to see the order in which statements execute, which aids in debugging.
Stepping enables you to walk through a script in debug mode to closely examine its execution.
In debug mode, control playback execution by using the following commands:
- Step Into (F11)
- Executes the script one statement at a time.
Step Into is useful to trace through each line in the code and steps into functions or embedded scripts. Each function or embedded
script is also executed one code line at a time.
Step Into is useful for detailed analysis of a test, and lets you see the effect of each statement on variable usage and test application
interaction.
Note: You cannot step into an
iterator while debugging a VB .NET script. The iterator is executed but the debugger will not show that the iterator was entered during
execution. You can set a breakpoint inside the iterator, and the execution will stop at the breakpoint, but any parameters
or local variables of the iterator will not be shown in the
Locals window. For additional information on iterators, see
Iterators.
- Step Over (F10)
- Executes each procedure as if it were a single statement. Use this instead of Step Into to go directly into a function, without
stepping through the individual lines that make up the function.
- Step Out (Shift + F11)
- Executes all remaining code in a procedure as if it were a single statement, and exits to the next statement in the procedure
that caused the procedure to be initially called.
- Set Run Pointer/Next Statement
- Continues execution with the statement at which the pointer is currently located, without executing any intermediate statements. Drag the pointer to the statement and click
F5 to execute it.
Stepping commands are accessed from the
DEBUG menu.