Original Post
Well, since I don't have a column here, I thought I might as well share my advice here. I'm currently working on a textmode raytracer. I was just converting my raytracer from a scanline renderer to a tile renderer to better utilize the cache. So I ran into this strange problem that happened during rendering. It would seem that all it rendered was a single offscreen tile. Unfortunately I found out that it was happening deep into the rendering cycle. This would mean that everytime I needed to see if it got fixed, I'd need to press the Step Over (F11) key about 800 times. I realized that there's no conditional breakpoint command in Visual Studio. Here's the important part. I suddenly remembered something from my Computer Organization (Pentium Assembly) course in University. The key is software interrups. So I hurridly coded up what I think will be very useful to everyone. So here it is. What this code will do is insert a breakpoint on the line that says "int 3". It will move the processor into single-step mode, and thus Visual Studio will also move into single-step mode allowing you to use all of your F10, F11, etc... keys. To get to your code, just keep stepping until you get there. So what do you think? Useful? Yes? No? Should I write some more useful tips like this (I've got a few more)?
void BreakIf(bool condition)
{
if(condition)
{
__asm
{
int 3
}
}
}