Partager via


Step Through Functions (Compact 7)

3/12/2014

When you debug, you can step into, step over, or step out of a function. Stepping works for the current process or thread only. To step through a section of code, you must first insert a breakpoint. When that breakpoint is reached, you can begin stepping through the code.

The step commands operate as follows:

  • Step Into. This command causes the debugger to execute the next statement and then enter a break state. If the next statement is a function, the Step Into command causes the debugger to enter the function and enter a break state at the beginning of the function. You use the Step Into command to execute code one statement at a time.
  • Step Over. This command causes the debugger to execute a function as a unit and to enter a break state after the function is completed. That is, the debugger enters a break state at the next statement in the current function regardless of whether the current statement is a call to another function.
  • Step Out. This command causes the debugger to finish executing the current function and enter a break state at the next statement in the function from which it was called.

To step into a function

  1. Start debugging and execute the application to some point inside a function.

  2. Do one of the following:

    • On the Debug menu, click Step Into.
    • On the Debug toolbar, click the Step Into button.
    • Press F11.

The debugger continues until it reaches the next available instruction within the function, and then it pauses.

To step over a function

  1. Start debugging and then execute the application until it reaches a function.

  2. Do one of the following:

    • On the Debug menu, click Step Over.
    • On the Debug toolbar, click the Step Over button.
    • Press F10.

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

To step out of a function

  1. Start debugging and execute the application to some point inside a function.

  2. Do one of the following:

    • On the Debug menu, click Step Out.
    • On the Debug toolbar, click the Step Out button.
    • Press Shift+F11.

The debugger continues until it has executed the return from the function; then it pauses.

See Also

Concepts

Control Debugger Execution
Kernel Debugger
Debugging

Other Resources

Windows Embedded Compact 7