Hints on using Just-In-Time debugging with Windows Vista

Just-In-Time debugging is trickier on Windows Vista than on previous operating systems. Today I am going to talk about the various knobs that you can use to make this better. Hint #1: Use Visual Studio 2008 Beta2. I expect Beta2 to be out soon. If you are developing on Windows Vista, I definitely recommend trying…

1

Debugging Windows Error Reporting

If you’re a software developer, chances are that you have written an application, and this application has crashed. When this happened, it probably put up a dialog that looks something like this:  How do you figure out what went wrong? Strategy #1: Extract the minidump from Windows Error Reporting Windows Error reporting has already created…

3

Analyzing Tracepoint Output

Last week I had this displeasure of tracking down a fairly unpleasant reference counting bug. I wound up having to solve the problem by brute force: Set a breakpoint in the constructor of leaking object Set a data breakpoint on the object’s reference count variable Change the data breakpoint to a tracepoint that prints the callstack (see…

0

Setting conditional breakpoints using object ids

In native code, its sometimes useful to set a breakpoint condition so that a breakpoint will only stop for a particular instance of an object. To do this, I simply use the address of the object: this == (CMyObject*)0x10fc10 In managed code, the garbage collector moves objects around, so even if you were writing in…

15

Tracking down native leaks

I have been spending some time looking at native memory leaks recently, and I decided to blog about some of the techniques which worked well for me. First, find out what objects are leaking. If your code doesn’t already have some sort of leak detection scheme, you can take advantage of the fact that the…

4