void DebugBreak(void) |
The DebugBreak function causes a breakpoint exception to occur in the caller. This allows the calling process to signal the debugger, forcing it to take some action. If the process is not being debugged, the system invokes the default breakpoint exception handler. This may cause the calling process to terminate.
This function has no parameters.
This function does not return a value.
This function is the only way to break into a WEP (Windows exit procedure) in a dynamic-link library.
For more information about using the debugging functions with Microsoft debugging tools, see Microsoft Windows Programming Tools.
The following example uses the DebugBreak function to signal the debugger immediately before the application handles the WM_DESTROY message:
case WM_DESTROY:
DebugBreak();
PostQuitMessage(0);
break;