dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.69k stars 3.98k forks source link

Internal Error in the expression evaluator #35025

Open vsfeedback opened 5 years ago

vsfeedback commented 5 years ago

VSF_TYPE_MARKDOWNVS2019. Attempting to watch a very large string value (called responseXML) during debug. Also tried immediate window with ?responseXML. Returns "Internal Error in the expression evaluator".

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/527429/internal-error-in-the-expression-evaluator-3.html VSTS ticketId: 844665 These are the original issue comments:

Visual Studio Feedback System on 4/10/2019, 06:50 PM (5 days ago):

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Craig Fisher on 4/15/2019, 02:56 PM (25 hours ago):

I'm getting this error when trying to view exception details. I don't have a large string value involved.

Visual Studio Feedback System on 4/15/2019, 06:08 PM (22 hours ago):

This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.

Craig Fisher on 4/16/2019, 01:41 PM (2 hours ago): Actually I'm also getting it just trying to view objects in the debugger. Turning on "use legacy C# & VB expression evaluator" gets around the problem. These are the original issue solutions: (no solutions)

ivanbasov commented 5 years ago

Looks similar but not same with https://github.com/dotnet/roslyn/issues/34220

NJKA001 commented 4 years ago

Also getting this issue. Turning on "use legacy C# & VB expression evaluator" does not fix the issue for me. I also tried turning off "Fast Expression evaluation" without success. I traced the code to a single line. After calling: Assembly.LoadFile(path);

I loose all debugging expressions (ToolTips,Locals,Watch window, Immediate Window etc.) Immediate window returns "Internal error in the expression evaluator."

Notes, If I change the line to Assembly.ReflectionOnlyLoadFrom(path); All is fine. If I load a different (normal none resources assembly) all is fine.

I've attached the assembly I'm loading. The calling project is a standard C# project (Target Framework is 4.7.2) and called directly from Program.Main().

Windows 10 Pro 1809 VS 2019 16.2.3

WindowsFormsApp2.resources.zip

tfontana625 commented 4 years ago

I'm having the same issues. I tried updating to 16.6.1 and I still have the problem. In debugging options there is no option to "use legacy C# & VB expression evaluator". I also don't see the WindowsFormsApp2.resources.dll to replace with the one in the previous post.

tfontana625 commented 4 years ago

I'm having the same issues. I tried updating to 16.6.1 and I still have the problem. In debugging options there is no option to "use legacy C# & VB expression evaluator". I also don't see the WindowsFormsApp2.resources.dll to replace with the one in the previous post.

Update: I had been trying trying out the trial period of the Ozcode extension. It had an update ready to install. I chose not to since I hadn't subscribed. To check if it might be causing the problem I uninstalled it and restarted VS. This seems to have fixed the problem.