I\'m experiencing a lot of problems with Entity Framework 6.0.1 in the VS2013 Ultimate debugger when debugging into unit tests against code that\'s hitting a live SQL Server
I am having a similar problem and although I'm yet to understand why, turning Options -> Debugging -> General -> Use Managed Compatibility Mode - On, allowed me to continue debugging as normal.
I found this option via this blog post.
There may be a problem regarding debugging if there are any entity with Virtual entities inside. We had this problem when trying to debug at entities inside Ef scope. Entity Framework then try to catch the state of the virtial entities.
We got a better result while viewing the entities outside db scope. This way EF is not involved while watching the entities values.
Shortly after installing VS2013, I also encountered the error
"Could not evaluate expression"
for numerous variables while debugging an older VS2012 solution (none of the code involved the entity framework).
The fix that worked was deleting the two Solution User Options (*.suo) files associated with the solution file. For example, for MySolution.sln
, the two corresponding files were:
It seems that the v12 version might have been corrupted when it was initially created using the settings from the v11 version. Hence, deleting both of them allowed for a new clean .suo
file to be created for VS2013 and the problem went away.
(Note, the .suo
files are marked as hidden on Windows 7 so you might not easily see them in Windows Explorer without either changing the settings to show them or using the command line to view them.)
I just wanted to add my voice to the crowd here.
I am developing a UWP app, not using the Entity Framework, and experienced a similar issue where the runtime "refused to evaluate the expression".
I was using Microsoft Visual Studio Enterprise 2015 Update 2 and the solution for me was for me to update to Update 3.
Visual Studio 2013 Update 2 promises to fix this error, found in the comments at:
http://weblog.west-wind.com/posts/2013/Nov/21/Visual-Studio-2013-Could-not-evaluate-Expression-Debugger-Abnormality