Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Historical Debugging in Visual Studio 2010

Historical Debugging in Visual Studio 2010

Leia em Português

This item in japanese

Have you ever wanted to know what you program was doing 5 minutes ago? Ever wondered exactly what files it was opening instead of the one you wanted it to? Well Visual Studio 2010 has got you covered.

During the Lang.NET keynote (10 minute mark), Microsoft demonstrated Visual Studio 2010’s diagnostic events and historical debugging features. These features allow developers to not only see the application as it currently stands, but also the events that led up to that condition.

The diagnostic events window shows key events in an application’s run. These include exceptions, file access, and debugger events. In some ways these could have been hand-rolled using Debug.Write statements or macros on breakpoints. But with an integrated list view, this allows you to filter on the type of event or the thread the event occurred on.

While a good feature on its own, this is dwarfed by the historical debugging capabilities. When turned on, Visual Studio can capture stack frames and the variables associated with them. This allows developers to back-step through the program to find out why something happened the way it did.

In order to save this information, the state of the application is stored on disk. By default it only stores key types, but developers can set it to record literally every parameter, object, and global variable. The only thing it will not store is local variables.

For more information, also see the video discussing historical debugging on Channel 9. This feature should be included in the upcoming beta 1 release.

Rate this Article