AfxDebugBreak (Debugging)
This topic applies to:
Edition |
Visual Basic |
C# |
C++ |
Web Developer |
---|---|---|---|---|
Express |
![]() |
![]() |
Native only |
![]() |
Standard |
![]() |
![]() |
Native only |
![]() |
Pro and Team |
![]() |
![]() |
Native only |
![]() |
Table legend:
![]() |
Applies |
![]() |
Does not apply |
![]() |
Command or commands hidden by default. |
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.