views:

277

answers:

1

I am trying out the Historical Debugger in VS2010 Beta 1.

I have it turned on in the settings (at least I think I do), but when I try to examine objects the value is:

[Historical Data Has Not Been Collected]

Any Ideas how to get this to show the actual value?

Here is the code in question:

 public partial class Form1 : Form

   {

       public Form1()

       {InitializeComponent();}

       private void button1_Click(object sender, EventArgs e)

       {

           int numer = Int32.Parse(txtNumerator.Text) ;

           int denom = Int32.Parse(txtDemoninator.Text);

           float answer = DivideValues(numer, denom);

           txtAnswer.Text = answer.ToString();

       }

       private static float DivideValues(int numer, int denom)

       {

           float answer = numer / denom;

           return answer;

       }

   }
A: 

To get it to work right you need to use the tree view in the Debug History Window. The navigation arrows in the gutter seem to be more of a distraction than a help as it lets you get to areas that are not recorded.

Also, local variables are not recorded. This is by design.

Vaccano