DebugBreak and __debugbreak
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
You can call the DebugBreak Win32 function or the __debugbreak intrinsic at any point in your code.
__debugbreak have the same effect as setting a breakpoint at that location.
DebugBreak is a call to a system function, system debug symbols must be installed to ensure the correct call stack information is displayed after breaking. Otherwise, the call stack information displayed by the debugger may be off by one frame. If you use
__debugbreak, symbols are not required.