View Single Post
set breakpoints programatically
Old
  (#1)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default set breakpoints programatically - 26-01-2004

had this question popping up in my mind in the beginning of this afternoon, then Stefan passed by (always wasting time around, this guy ) and we met on IRC and 5 minutes after the answer was found, one browsing his MSDN CDs and the other one Googling around at msdn.microsoft.com. I really love that sort of cooperation between bot coders at Bots United

Found this loveable DebugBreak() function, which on intel machines, does basically this:
Code:
_asm int 3
the effect of this is similar as if you had set a breakpoint at this location. This enables you to break in your code on request (for example, by bringing down the console and typing a server command...)

So here it is, for those who might be interested.

Handy, eh ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote