Stepping Into Functions

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

What do you want to do?

Run the program and execute the next statement

Step into a specific function

To run the program and execute the next statement (Step Into)

  1. While the program is paused in break mode (program is waiting for user input after completing a debugging command), click Step Into from the Debug menu.

    The debugger executes the next statement, then pauses execution in break mode. If the next statement is a function call, the debugger steps into that function, then pauses execution at the beginning of the function.

  2. Repeat step 1 to continue executing the program one statement at a time.

If you step into a nested function call, the debugger steps into the most deeply nested function. For example, on the line of code Fun(Fun2); the debugger steps into the function Fun2, then pauses.

To step into a specific function

  1. Set a breakpoint just before the nested function call.

    – or –

    Use the Step Into, Step Over, or Run To Cursor command to advance the program execution to that point.

  2. In a source window, select the function that you want to step into.

  3. On the Debug menu, or on the source window shortcut menu, click Step Into Name, where Name is the name of the selected function.

    The debugger executes the function call and pauses execution at the beginning of the selected function.

Step Into Specific Function works for any number of nesting levels. You can also sometimes use Step Into Specific Function to step into a member function; for example, MemberFn in the line of C++ code CMyClass::MemberFn();.