VS 2010 Beta1“历史数据尚未收集”

发布于 2024-07-20 10:18:55 字数 726 浏览 5 评论 0原文

我正在尝试 VS2010 Beta 1 中的历史调试器。

我在设置中打开了它(至少我认为是这样),但是当我尝试检查对象时,该值是:

[历史数据尚未收集]

任何想法如何让它显示实际值?

这是有问题的代码:

 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;

       }

   }

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;

       }

   }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只是一片海 2024-07-27 10:18:55

为了使其正常工作,您需要使用“调试历史记录”窗口中的树视图。 装订线中的导航箭头似乎更多的是分散注意力而不是提供帮助,因为它可以让您到达未记录的区域。

另外,局部变量也不会被记录。 这是设计使然。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文