This documentation is archived and is not being maintained.

AfxDebugBreak (Debugging) 

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Express Edition

No

No

Native

No

Standard Edition

No

No

Native

No

Pro/Team Edition

No

No

Native

No

MFC provides a special AfxDebugBreak function for hard-coding breakpoints in source code:

AfxDebugBreak( );

On Intel platforms, AfxDebugBreak produces the following code, which breaks in source code rather than kernel code:

_asm int 3

On other platforms, AfxDebugBreak merely calls DebugBreak.

Be sure to remove AfxDebugBreak statements when you create a release build or use #ifdef _DEBUG to surround them.

See Also

Show: