Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

While debugging I get this when using Watch: Internal error in the C# compiler

I've been working along very happily in an app in VS2017. Debugging just fine. Then, all of a sudden...

When I am debugging and try to hover over a variable, I don't get the normal popup with details of the object. And if I put it in the Watch, I get this for the value:

Internal error in the C# compiler

I closed and re-opened VS, then I rebooted. Still get the same error.

There is very little about this out there. Has anyone ever seen this before?

like image 769
Casey Crookston Avatar asked Feb 01 '18 21:02

Casey Crookston


People also ask

What is C programming debugging?

Debugging is a methodical process of finding and reducing the number of bugs (or defects) in a computer program, thus making it behave as originally expected. There are two main types of errors that need debugging: ▶ Compile-time: These occur due to misuse of language constructs, such as syntax errors.


1 Answers

Found an answer here that worked:

Please view menu Tools-> Options > debugging > enable Use Managed Compatibility Mode, and then debug your dump file, how about the result?

No clue why it was working and then suddenly stopped. But, it's working again now.

Edit LONG After:

This recently got an upvote, so the problem is still out there, lurking. I should add that after this solution solved the problem, it soon came back and nothing I could try got rid of it. I ended up totally removing all traces of VS and re-installing it, which pretty much took all day.

Edit LONG LONG After:

Even after uninstalling and re-installing VS, the problem eventually came back. This time I took my laptop to my employer's helpdesk team and they ended up just giving me a new laptop.

If that's isn't an option for you, may God help you, because I have no idea. I found some threads about this on various MS forums, and the MS employees always just close them with "not able to reproduce".

like image 200
Casey Crookston Avatar answered Nov 15 '22 00:11

Casey Crookston