Gold mine of Visual C++ tricks!
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.
| Print article | This entry was posted by Jijo Raj on March 23, 2008 at 6:43 pm, and is filed under Debugging Tips. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |










about 2 years ago
It would be better if we DebugBreak();
about 2 years ago
Yes. You are right. DebugBreak() also does the same. But everyone wants to know the internals. right?