IntelliTrace Tales #1
Currently here at Microsoft (on the diagnostics team in particular ;) ) many of us are using IntelliTrace in our own day to day debugging work. This dogfooding process is a big part of Microsoft culture and something that we really need to keep growing IntelliTrace in the years ahead. As a way of showing external customers how we’ve using IntelliTrace internally I’ve started up the IntelliTrace tales series of blogs posts, of which this is the first. This series will focus on quick little stories about how we are using IntelliTrace internally here at Microsoft to help with our own debugging and testing efforts.
Spotting swallowed exceptions
Often when debugging you can run into an exception out of the blue, yet that exception doesn’t give you all the information that you need to diagnose the issue. Often this issue can be resolved by examining a deeper or earlier exception that was thrown and then swallowed up before being surfaced to the user. But it’s not always easy to get back in time, enable the correct exceptions and examine exactly what cause this issue. But the fact that IntelliTrace is always running and collecting debug data when exceptions are thrown can often majorly help to alleviate this scenario, as seen below.
In this example one of our developers was working with some XAML code and ended up running into an XAMLParseException as seen below.
Now this initial exception wasn’t informative enough for our developer to take action, so he took a quick look over at the IntelliTrace events list and browsed though the most recent exceptions. There on the list was the actual exception thrown instead of the more general XAMLParseException that ended up bubbling up to the surface.
From that exception he was able to take much better action on the bug jumping right to where he needed to change something like Converter=VisibilityConverter to Converter={StaticResource VisibilityConverter}. I like how this report from the developer that using IntelliTrace can just be an unobtrusive part of your regular debugging. Then when you need more info there are some times where it can really step in and save you a bunch of time and hassle.
Comments
Anonymous
March 02, 2010
Hi guys! Is the IntelliTrace format open? I hoped it to be xml but a look at "C:ProgramDataMicrosoft Visual Studio10.0TraceDebugging" proved me wrong. I would like to enhance/generate the intellisense log in my code at runtime. Is there any docs for it? Thanks!Anonymous
March 03, 2010
There are a couple of extensibility points for IntelliTrace. First off you can add your own custom IntelliTrace events. To do this you need to add them in to the CollectionPlan.xml file (see my blog entry on this) and create custom PDQs. The other extensibility option is for cracking open the .iTrace files for alternative analysis. The IntelliTraceFile class in Microsoft.VisualStudio.IntelliTrace.dll is your entry point for this type of extensibility.