gpt4 book ai didi

visual-studio - Visual Studio Debugger 未在鼠标悬停时显示变量详细信息,因为它是 "out of context"

转载 作者:行者123 更新时间:2023-12-03 23:15:38 27 4
gpt4 key购买 nike

我在 Visual Studio 2013 中有一个 F# 程序,它在一开始就创建了一个对象。我想调试代码并在许多不同的时间点查看此对象的值。我以前可以通过在 Debug模式下将鼠标悬停在变量上来做到这一点,但由于某种原因,我不再能够做到这一点。当我添加 watch 时,它给了我错误:

The value for this item is stale due to a problem that occurred while evaluating it. Hover your cursor over the refresh button for details. Old Value: The name 'MyData' does not exist in the current context.



然后将鼠标悬停在刷新按钮上:

The value of this expression may be incorrect. It could not be evaluated because: 'The name 'MyData' does not exist in the current context' Click this button to attempt reevaluation now.



更奇怪的是,我知道该变量有效,因为它作为参数传递给其他外部函数,我可以看到这些辅助函数中的所有值,但不能在全局范围内看到!有谁知道发生了什么?

最佳答案

转到项目的属性并取消选中“优化代码”。重建你的代码。如果问题仍然存在,请重新启动 Visual Studio。

关于visual-studio - Visual Studio Debugger 未在鼠标悬停时显示变量详细信息,因为它是 "out of context",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30052331/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com