Hardcoding Breakpoint.
![]()
In some cases, MSDEV wont allow to set break point event if we press F9 a number of times. In those situations you can hardcode a break point by yourself.
![]()
Just insert the following line to the point where you would like to break while executing.
__asm int 3;
![]()
VisualStudio uses Interrupt 3 for implement break points. When we put a breakpoint, actually the debugger is inserting an int 3 instruction at that point. While executing, when an interrupt 3 is raised – debugger understood that one breakpoint is reached and it breaks and shows the appropriate code.
It would be better if we DebugBreak();
Yes. You are right. DebugBreak() also does the same. But everyone wants to know the internals. right?