Dan Wahlin

Dan Wahlin

Dr. Dobb's Blogger

Guru Blogs What's a Guru?

Architecture & Design

Arnon Rotem-Gal-Oz
Mike Gualtieri

C/C++

Andrew Koenig Christopher Diggins

Database

Ken North
Jocelyn Paine

Development Tools

Mike Riley
Walter Bright
Pablo Santos




Visual Studio 2010's New 'IntelliTrace' Feature

Apr 13, 2010

I'm at DevConnections this week in Las Vegas speaking at the Visual Studio 2010 launch event and had a chance to catch up with one of my favorite people -- Ward Bell. Ward is the Vice President of IdeaBlade and was one of the presenters during Scott Guthrie's keynote address. He covered an interesting new feature called "IntelliTrace" that provides a way to capture information during a debug session. Ward and I sat down for a quick chat to talk more about what IntelliTrace offers .NET developers.

Tell me about IntelliTrace.

IntelliTrace is a terrific new historical debugging tool built into Visual Studio 2010. You can think of it as a type of time machine where you can record your application's events as its run and then move backwards and forwards in time through the debugger.

When would you use it?

Have you ever had to deal with one of those chutes and ladders code bases where one thing leads to the next thing which leads to the next thing and you don't know what's really happening? This can be especially hard to deal with when you have an application with a lot of loosely coupled components all being created with dependency injection. You can't do static analysis because nothing refers to anything else since its all dynamic. What do you do today? You place a bunch of break points, you step through, and you go past some point and go "uh", I want to go backwards -- where did I come from?

So then you start over from the beginning and try to remember to stop at the appropriate spot. IntelliTrace allows you to replay exactly what happened as the application ran. I can step forward and backward, it shows me a full stack trace at all times, and I can even see parameters and return values that were passed around.

How do I set it up in Visual Studio?

Go to Tools --> Options --> IntelliTrace. It's enabled by default but will only capture events since they're not expensive to capture. However, the real value begins when you start tracking all of the call information. Every time you debug, IntelliTrace will pop-up and you can use the historical debugger while you're debugging live. Meaning, suppose I'm in there and have a break but want to back up and re-approach the break point, I can do that with IntelliTrace.

I understand you can replay captured sessions?

Yes, somebody else who has captured a debugging session with IntelliTrace can send you the log and the .dlls and pdbs if you don't have them and you can replay their session. The session may have gone to the database (which you don't have), it could be configured in a way you can't reproduce, it could be on a network you can't reach, but you don't care because with a log and the .dlls and pdbs you can replay it.

Having the source code is even better of course because then you can see it as if you were debugging it on your own machine. It's great for those mystery failures where it works on your machine but not someone else's. It's also great in multi-threaded situations where the bug disappears when you step through the application but shows up at regular speed.

Any caveats and how do you work around them?

The most obvious one is that you can't do a debug record on 64-bit machines. You can play back log sessions fine, but you can't F5 to start debugging and recording. But, there's a trick!

If you can change your configuration to run as 32-bit, you can F5 and record. Check out these screenshots that shows what needs to be changed:

Around the Web

An Events Based Algorithm for Distributing Concurrent Tasks on Multi-Core Architectures

Here's a programming model which enables scalable parallel performance on multi-core shared memory architectures.

Quick Read

Swarm: A True Distributed Programming Language

The Swarm prototype is a simple stack-based language, akin to a primitive version of the Java bytecode interpreter.

Quick Read

Key Software Development Trends

Several trends are emerging within the area of software development. Here are some of the most important trends S. Somasegar has been thinking about recently.

Quick Read

Understanding Parallel Performance

Understanding parallel performance. How do you know when good is good enough?

Quick Read

Short and Tweet: Experiments on Recommending Content from Information Streams

The authors used 12 algorithms to study the URL recommendation on Twitter as a means of better directing attention in information streams.

Quick Read




Visual Studio 2010 Video

VS10_W1RichVortex_G_640x480_High TEST; DDJ;


Enabling People and Organizations to Harness the Transformative Power of Technology