DebugBreak

3.0

  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.

Parameters

This function has no parameters.

Return Value

This function does not return a value.

Comments

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.

Example

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;

See Also

WEP