In this blog post I thought I would talk a little about one of my favorite features of VS2010, Intellitrace. Intellitrace is debugging on steroids. In regular debugging session you can see the values of variables at a certain time, but you can’t go backwards, and you cannot see the state of the entire system. This means that some bugs cannot be reproduced.
With Intellitrace a log file is created that allows you to debug the file. This is similar to a dump but has lots more information, and when run inside Visual Studio it allows you to recreate (or at least see) the bugs that occurred on the other computer. An example of this that you might read a value from an XML file when the application starts that is used much later, and only on a limited number of code paths. If this value is not read it may cause no problems most of the time. If after some work you narrow down that the problem is that the value is not there you would still have to then add a breakpoint where the read occurs and see why it was not read. If your computer has the file but the other computer does not, that can add even more complexity to the debugging process. With Intellitrace you can load the log file that was made on the QA machine and immediately go back to where the file was read and see what the problem is.
Intellitrace is available only in the Ultimate edition of Visual Studio 2010, but works on C# and VB .NET code written for .NET versions 2.0 and up. Intellitrace does not support debugging in XBOX, script and Silverlight applications. While Intellitrace does not support debugging applications running on another computer and attached, it does support opening a log file created in Visual Studio on another computer. Intellitrace can also be run from Test Manager as well as Visual Studio Ultimate 2010. Intellitrace also integrates with Team System allowing QA people to attach trace log files to work items that can then be assigned to other developers.
Intellitrace is always on be default but only collects minimal information, you can change the information Intellitrace collects by changing the settings in Visual Studio. The events that can be collected by Intellitrace include debugger events (events that occur while you are debugging your application including the STEP event and hitting breakpoints), exception events, and framework events (these can be initiating a method call, or file access).
As you can see Intellitrace is a great tool for speeding up the debugging process and if used correctly can even allow you to go backwards through your code. For more information, check out MSDN’s information at: http://msdn.microsoft.com/en-us/library/dd264915.aspx