Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C++
C/C++ Languages
Compiler Intrinsics
 __debugbreak
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual C++ Language Reference
__debugbreak

Updated: November 2007

Microsoft Specific

Causes a breakpoint in your code, where the user will be prompted to run the debugger.

void __debugbreak();

Intrinsic

Architecture

__debugbreak

x86, IPF, x64

Header file <intrin.h>

The __debugbreak compiler intrinsic, similar to DebugBreak, is a portable Win32 way to cause a breakpoint.

Note:

When compiling with /clr, a function containing __debugbreak will be compiled to MSIL. asm int 3 causes a function to be compiled to native. For more information, see __asm.

For example:

main() {
   __debugbreak();
}

is similar to:

main() {
   __asm {
      int 3
   }
}

on an x86 computer.

This routine is only available as an intrinsic.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker