Browse by Tags
All Tags »
debugging (RSS)
Here’s a bug I came across that earns the “phase of the moon prize”. See if you can pick it up: class Storage { public : Storage() : valx(0), valy(0) { } Storage( int x, int y ) : valx(x), valy(y) { fValid = x != 0 && y != 0; } FGetValues( int
Read More...
Sometimes, the reward of your investigation is finding out someone else has to do the hard job of actually fixing the problem. The Background The bug I was tasked with solving was this: Add a word to a shape, double click the text, do this specific operation
Read More...
Over this last week I had to debug two issues. If you’re a college student and read this blog, you would have discovered the problems in no time. MessageBox from Nowhere As a warm up, the easy one and a new Visual Studio feature: Break All. The bug is
Read More...
I was gone most of this week for a 3-day event, so I’ll leave you with this quick tip. In Visual Studio, when you’re debugging and you’re stepping through the program, move the cursor over a variable. Notice how you can expand it by clicking on the cross
Read More...
How many times have you had someone come up to you with a problem that they couldn’t describe? And if they could describe it, you can’t reproduce the problem on your machine. And even if you know where the problem might be (thanks to an error code or
Read More...
Here’s something I didn’t know about until I saw someone use it here at Microsoft. Data breakpoints are a nice debugger feature that let you find out when a memory address changes. Say you have some code like this and you’re trying to figure out why the
Read More...
If I could teach an Industry 101 class, debugging would be a big part of it. Mostly because I’ve found class teaches you how to code, but never how to interact with written code. What I mean by that is how often have you had a problem in a lab partner’s
Read More...
As several people commented on yesterday's post , the most common answer is -536870912 (0xE000000 in memory) That's because: most compilers implement arithmetic shift , even though they don't have to and most PCs are x86 32-bit. The point was to illustrate
Read More...