次の方法で共有


The anatomy of the Historical Debugger Navigation Bar (Navbar)

In a recent Channel 9 10-4 video, Brian Keller introduced the Historical Debugger in Visual Studio Team System 2010. One of the features that he described in his video was the Historical Debugger Navigation Bar (Navbar) which he used to step back in the application.

In this post, I'm going to describe in detail what the navigation bar does and how to use it. Let's start with a screenshot of what I mean by the navigation bar.

Historical Debugger Navigation Bar

The idea behind the Historical Debugger Navigation Bar is that you can use it to "time travel" through your application and go back and forward in your application to debug a problem. Think of it as the remote control for your Digital Video Recorder (DVR). You can rewind and fast forward as well as skip to sections of your application that you want to debug. The following screenshot shows what the individual controls on the Navbar do and the corresponding shortcut keys.

Historical Debugger Navigation Control

You can download Visual Studio Team System Beta 1 which includes the Historical Debugger. I've included the following sample code below so that you can use it to play around with the Historical Debugger. I'm always eager to hear your feedback.

 using System;

class Program
{
    static void Main()
    {
        Sphere earth = new Sphere();
        double earthRadius = 3956.6; // miles
        double earthArea = earth.CalculateArea(earthRadius);
        Console.WriteLine("The area of earth is {0} square miles", earthArea);
    }
}

public class Circle
{
    // Area = PI * (R) ^ 2
    public double CalculateArea(double radius)
    {
        return (Math.PI * Math.Pow(radius, 2));
    }
}

public class Sphere
{
    // Area = 4 * Area of Circle
    public double CalculateArea(double radius)
    {
        Circle c = new Circle();
        return (4 * c.CalculateArea(radius));
    }
}

Habib Heydarian.