Partager via


Code Stepping Overview 

One of the most common debugging procedures is stepping: executing code one line at a time.

The Debug menu provides three commands for stepping through code:

  • Step Into

  • Step Over

  • Step Out

Step Into and Step Over differ in only one respect, the way they handle function calls. Either command instructs the debugger to execute the next line of code. If the line contains a function call, Step Into executes only the call itself, then halts at the first line of code inside the function. Step Over executes the entire function, then halts at the first line outside the function. Use Step Into if you want to look inside the function call. Use Step Over if you want to avoid stepping into functions.

On a nested function call, Step Into steps into the most deeply nested function. If you use Step Into on a call like Func1(Func2()), the debugger steps into the function Func2.

In native code, if you want to step into a specific nested function, use the Step Into Specific command from the shortcut menu. If you are debugging managed code, this command is disabled. For more information, see How to: Step Into a Specific Function.

Use Step Out when you are inside a function call and want to return to the calling function. Step Out resumes execution of your code until the function returns, then breaks at the return point in the calling function.

See Also

Concepts

Execution Control