◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── Tracing Execution ■ With event-driven programming, it is not always obvious what the first statement executed will be. Because of this, tracing execution is useful in Visual Basic. ■ Use these techniques to trace the execution of code: • Single stepping traces through each line of the procedure. Use this when you want to see the effect that each statement produces. • Procedure stepping executes each procedure as if it were a single statement. Use this technique in place of single stepping when you want to step across procedure calls rather than into the called procedure. ■ Watches are commonly used with single stepping and procedure stepping. See: ◄Adding Watches► ■ To trace execution from the current statement: • Press F7 to execute code to the current cursor position • Press F8 to execute code one line at a time • Press F10 to step across procedure calls See: ◄Run and Debug Keys► ■ You can also set a breakpoint within a procedure before you start running the application. When the application halts at the breakpoint, trace from there. See: ◄Setting Breakpoints►