Introducing Customer Debug Probes and CLR SPY

Version 1.1 of the .NET Framework introduces a handy feature called Customer Debug Probes (CDP).  These probes enable you to find and diagnose difficult bugs lurking in managed code, even in a production environment. I’ll share the details of each probe in future blog entries, so stay tuned.  In the meantime, I’ve uploaded a tool…

16

The transformation of Jim Miller

Jim Miller, one of the CLR’s brilliant architects, has been known to go months being clean shaven and go months being the exact opposite of clean shaven.  He just switched modes again, and nobody at work recognizes him.  He claims he did this because needed to look the part for Seattle Opera’s production of the Ring,…

16

Suggestions for future CDPs?

In my next blog entry, I’ll explain the 11th and final Customer Debug Probe (CDP) that exists in the v1.1 product.  But for the next version of the product (code-named Whidbey), we’re looking at adding additional probes, and not just in the area of Interop.  The goal is to help you find, prevent, and/or diagnose…

15

Quiz: Searching in a managed array

Sorry for my recent lack of blogging.  There’s been a lot going on these days! As the banner on my blog now indicates, you’ll be able to catch me at two upcoming conferences.  As with TechEd in June, Sonja Keserovic and I will be giving an Interop presentation at this year’s PDC in October.  This…

15

Petzold vs. Nathan? Books Like PowerPoint Presentations? Books Like Blogs?

Last week a coworker brought this article by Jeff Atwood to my attention: Coding Horror: How Not To Write a Technical Book Of course, I’m flattered by what Jeff (and commenters) said, and I’m happy that he gave my book a chance (especially since he didn’t seem to be familiar with my .NET and COM book)….

15

CLR SPY and Customer Debug Probes: The Object Not Kept Alive and Buffer Overrun Probes (A Quiz)

The Object Not Kept Alive and Buffer Overrun probes are unlike any other CDPs, because they do not output any messages to report bugs in your code.  Instead, they change general CLR behavior with the goal of forcing non-deterministic bugs that can be almost impossible to reproduce into bugs that will happen every time you…

15

CLR SPY: Feature requests for the next version

Now that I’m set up at my new blogging home, I’d like to get some feedback from anyone who has used the CLR SPY tool that I’ve uploaded to gotdotnet.com and blogged a lot about in the past. We’re investigating shipping the tool in the .NET Framework SDK, and would like some feedback on what…

15

Migrating Internet Hearts to WinFX

Last year, Chris Sells wrote a series of articles in which he set out to rewrite Solitaire using Avalon.  The lack of scaling graphics in the Win32 version (and lack of access to its source code, I suppose) forced him down the road of rewriting the app from scratch.  Plus, the point was to explore “the…

14

Quiz: Gotcha with Exceptions and HRESULTs

The C# code below, when executed, prints the following:   0x80004002   0x80004002 Who can figure out why the second line printed isn’t 0x80004003? using System; using System.Runtime.InteropServices;   public class Quiz {   const int E_NOINTERFACE = unchecked((int)0x80004002);   const int E_POINTER = unchecked((int)0x80004003);     public static void Main ()   {    …

12

WPF Book Update (and SD West 2006)

Long time no blog, but I’ve got a good excuse.  Since my last post, I’ve become a father!  This event, of course, made me seriously doubt (even more than usual) the wisdom of writing another book. Here’s a quote from my wife: “You wrote a book during our first year of marriage.  You’re writing a…

12