开发者

Visual Studio 2010 expression evaluation in debugger gives "Cannot evaluate expression because debugging information has been optimized away"

开发者 https://www.devze.com 2023-02-20 07:57 出处:网络
When debugging unit tests in Visual Studio 2010 SP1 with NUnit 2.5.开发者_开发知识库7 I often get this error evaluating an expression in the immediate window:

When debugging unit tests in Visual Studio 2010 SP1 with NUnit 2.5.开发者_开发知识库7 I often get this error evaluating an expression in the immediate window:

Cannot evaluate expression because debugging information has been optimized away

Often this happens when I test a few expressions and then all of a sudden I get this error. When the error occurs, the locals window empties out and the next attempt to step into a line effectively runs the code to the end--no more debugging.

I've seen something similar in ASP.NET related to the worker process not responding to ping requests since it was being debugged, but in my situation I'm running a local application, not a web application.

I'm running the tests through ReSharper 5.1.3. The code is all being built for for the "Debug" configuration against the .NET 4 framework.

This happens most of the time I run the debugger since upgrading from VS2008 to VS2010 yesterday.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号