Share via


Stepping Over or Out of Functions

Home Page (Debugger)OverviewHow Do I... Topics

What do you want to do?

Step over a function

Step out of a function

To step over a function

  1. Open a source file, and start debugging.

  2. Execute the program to a function call.

  3. On the Debug menu, click Step Over.

    The debugger executes the next function, but pauses after the function returns.

  4. Repeat step 3 to continue executing the program, one statement at a time.

To step out of a function

  1. Start debugging, and execute the program to some point inside the function.

  2. On the Debug menu, click Step Out.

    The debugger continues until it has completed execution of the return from the function, then pauses.

Caution   In general, to avoid very slow execution, you should not step out of a function containing a loop. Instead, you should set a breakpoint at the end of the function, and then choose Go from the Debug menu to execute to the end of the function. Then choose Step Out.