Share via


How to: Get Back to the Function that Called MFC If Halted

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not apply Topic does not apply

Native only

Topic does not apply

Standard

Topic does not apply Topic does not apply

Native only

Topic does not apply

Pro and Team

Topic does not apply Topic does not apply

Native only

Topic does not apply

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

If you used the Break command on the Debug menu to halt the program and ended up in MFC and you are sure the problem is in your code, you can use the Call Stack window to navigate back to your function. For more information, see How to: Use the Call Stack Window.

Sometimes, your code may in the message pump. In that case, there is no user code on the call stack. To avoid this problem, you can use breakpoints (possibly with conditions and hit counts) instead of the Break command. For more information, see Breakpoints and Tracepoints).

To navigate to the function from which MFC was called

  • Use the Call Stack window.

When no user code is on the call stack

Sometimes, your code may in the message pump. In that case, there is no user code on the call stack.

To avoid breaking in the message pump

  • Use breakpoints (possibly with conditions and hit counts) instead of the Break command. For more information, see Breakpoints and Tracepoints.

See Also

Concepts

Debugging Native Code FAQs

Other Resources

Debugging Native Code