IntelliTrace Part 1


IntelliTrace is one of the killer features in VS 2010 and yet seems to be one of the most under used.

Whenever I speak at user groups or events I often ask the audience who uses IntelliTrace..  Every time almost no hands go up.  I am not sure if this is because it can be a bit difficult to learn or whether it hasn’t been marketed enough.

So this series is my attempt to provide a good overview of the feature set, where it works and where it doesn’t.

Over the next few posts I will drill into IntelliTrace, show how it works and how to get the best out of it

If you have any questions that you would like answered as part of this series please post a comment and I will make sure that I address them.

I am intending to collate this info into a presentation and present at Tech-Ed and some user groups.

Getting Started

Ok, so let’s ease our way into it.  Firstly in order to view the IntelliTrace logs you will need Visual Studio 2010 Ultimate.  So if you don’t have that, then you might want to download the trial edition if you want to follow along.  You can download the trial here

What is IntelliTrace?

MSDN docs say that IntelliTrace provides an enhanced picture of your application compared with traditional debuggers.  I would probably push the boat out a bit further than that  and say that it is a fantastic feature that not only makes development easier, but help diagnose those ‘impossible bugs’.  If you have VS Ultimate edition and don’t make use of IntelliTrace then you are really missing out.

In my view IntelliTrace is like 2 things.  The most common example is a Flight Recorder (think the indestructible black box on an aircraft)  The black box enables engineers to extract the data and ‘replay’ the flight as it happened using telemetry and instrument diagnostic data.  Well IntelliTrace is very much like that.  Deploy your software to test, turn on IntelliTrace and a log file will be generated.  That file is your telemetry data.  Using that file enables you to recreate what happened to your application.  If you find yourself having to write a lot of Trace statements to understand why certain errors are happening you are going to love this.

So what else is IntelliTrace like.  Remember the Tom Cruise movie Minority Report.  Stay with me here.  Tom Cruise used his hands to interact with data coming from psychic err something's.  I am not talking about the flipping the hands to load a new scene, but how he actually goes backwards.  He uses an imaginary dial and twists his hands left and right to go backwards and replay a scene.  Well whilst you are developing code IntelliTrace is exactly like that.  How many times have you gone through this cycle. 

  • Add a breakpoint to some code that is not working.
  • F5
  • Hit your breakpoint and realize that you have gone too far and now need to start again from step 1.

And it could be worse, you could be manually updating variables, skipping statements etc., so starting again from the first step could be a big waste of time.  This is where IntelliTrace comes in.  You can use IntelliTrace to go back through the debug session to find the part you need.  How useful would that be?  You can examine the call stack, local variable values and return values from functions.  So that cycle above should now be a thing of the past.

Excited, interested, not bored yet.  Excellent.  See you in Part 2.


No comments :

Post a Comment