Get “Internal error in the expression evaluator” on “Add watch” function when trying to debug WCF service code (MSVS 2013)

好久不见. 提交于 2019-11-27 02:55:06
Igal Tabachnik

This might be a bug in the new (managed) debug engine that ships with Visual Studio 2013. Try turning on Managed Compatibility Mode (which effectively turns it into pre-2013 debug engine), located under Tools - Options - Debugging:

If this solves the issue, then I'd suggest trying to reproduce it with a small project, and then reporting it on Connect, so it could be fixed.

@bjhuffine comments below that there are other ways to enable compatibility mode, without globally disabling it (e.g. per-project). More information here: http://blogs.msdn.com/b/visualstudioalm/archive/2013/10/16/switching-to-managed-compatibility-mode-in-visual-studio-2013.aspx

Michael Freidgeim

According to question "Internal error in the expression evaluator" 'Use Managed Compatibility Mode' stops "Edit & Continue". Try to check "Use the legacy C# and VB expression evaluators" option under Tools - Options - Debugging.

KomArko

I tried Igal's answer, and it did not work for me, but I found a solution that worked for me. I cleared the Watch and started to add items again. I noticed that if I tried to add item which was not inside current sub or function then an internal error occurred.

I solved the problem by adding other items from inside their subs or functions and there were no errors again.

Michael Freidgeim's answer helped me debug my issue. But I want to add additional details to the cause of my issue. Only slightly related to asker's question, but his error is extremely misleading.

We were using a Telerik controls RadGrid with GridDateTimeColumn's. The MinDate property on these grids defaults to 01/01/1980 so if you bind a date to this column that is less than that you will see this error. The weird thing is that the original binding and displaying didn't cause a problem, it was only when navigating to another page that the error was thrown.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!