Share via


IDebugProgram2::CauseBreak

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Requests that the program stop execution the next time one of its threads attempts to run.

Syntax

HRESULT CauseBreak(   
   void   
);  
int CauseBreak();  

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

An IDebugBreakEvent2 event is sent when the program next attempts to run code after this method is called.

This method is asynchronous in that the method returns immediately without necessarily waiting for the program to stop.

See Also

IDebugProgram2
IDebugBreakEvent2