推荐的副本是a)不是VS 2015特定的,b)接受的答案有明确的评论:
不幸的是,它似乎没有出现在VS2015(devenv v14)
中
所以我正在寻找如何在VS 2015中做到这一点?
---原来的问题是:----
在VS 2015中多次调试时,我想知道方法返回的实际值。 (如return <expression>;
)
在场景中我经常想不出比(停止),修改源代码和编写
更好var result = <expression>;
return result; // and place a breakpoint here, and "watch" the result variable.
场景如:
<expression>
很复杂,就像LINQ一样,有许多嵌入式函数,可能会评估它可能有副作用,或者只是迭代器不能多次迭代<expression>
时调试器挂起我只是想知道是否存在我缺少的内置方式,并设置断点(见下文)并以某种方式知道实际(已经评估过的)实际返回值?
//...
return <expression>;
} // place a beakpoint here and see what is the actual eveluated return value
// Maybe I am wrong, but I think it must be an point in time when the actual
// return value is already evaluated runtime so it is not an extreme idea to
//allow to "watch" it for the developer.