-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error reporting is completely broken #11323
Comments
Interesting that spell checking is returning items seen by the error list but actual diagnostics are not. |
Unfortunately, I can't repro this, and all errors seem to be working for me. Granted I am using a newer version of VS. My build of 17.13 P2.1 seems to be completely broken so I need to fix that first, before I can try there @Peter-Juhasz don't suppose there is anything interesting in the Razor Log Output? The fact that spell checking, completion and nav bars are working, but not diagnostics, is quite surprising. |
I did not find anything suspicious, here is the full log from start of VS and opening the file:
|
Possible duplicate of https://developercommunity.visualstudio.com/t/Errors-are-not-reported-in-Razor-files/10822934. In that report, both Roslyn and Razor are seeing an exception in diagnostics:
@Peter-Juhasz do regular C# diagnostics work in the same project? If not, it could be the same issue. |
Roslyn works fine, diagnostics are missing only in Razor files. I don't see any errors in ActivityLog.xml either. Is there any other place I could look for potential logs? It is also strange that this issue is not present on my notebook (same VS version, same user profile synced, same Windows user/policies). |
Logs are written to the |
I was able to find the same exception in the file named
|
Out of curiosity, is it present anywhere in a Either way, I'll monitor the above linked VS Feedback issue, which is with the Roslyn team to investigate, and will keep you posted here. |
Yes, it is in a file named <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>0</EventID>
<Type>3</Type>
<SubType Name="Error">0</SubType>
<Level>2</Level>
<TimeCreated SystemTime="2025-01-08T08:24:21.9467442Z" />
<Source Name="Roslyn.AlwaysActivateInProcLanguageClient.1" />
<Correlation ActivityID="{d162d08e-d92b-42e8-983d-939996fc7672}" />
<Execution ProcessName="devenv" ProcessID="3876" ThreadID="349" />
<Channel/>
<Computer>REDACTED</Computer>
</System>
<ApplicationData>Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

at System.ThrowHelper.ThrowKeyNotFoundException()

at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

at Microsoft.CodeAnalysis.Diagnostics.InProcOrRemoteHostAnalyzerRunner.<>c__DisplayClass12_0.<AnalyzeOutOfProcAsync>b__2(ValueTuple`2 entry)

at System.Collections.Immutable.ImmutableDictionary.<> |
Thanks. It's surprising to me that regular C# diagnostics work even though that is reported, but I don't claim to understand all of the moving pieces here. |
Yes, it does! Although, I had a strange experience yesterday, where diagnostics were at the very least delayed. It was a small 2 files console app, and first I thought I'm experiencing this issue, but after like 10 seconds the diagnostics/squiggles appeared in the editor. I'm not sure I was experiencing this issue, or it was related to this one (a fatal exception may not resolve even after any delay), but that was the only similar symptom I experienced so far. |
VS 17.13 P2.1 with no extensions enabled
20241219-1220-12.8682006.mp4
No errors are displayed as squiggles, in the Error List or on the scroll bar. Both markup and embedded C# are affected.
HTML and C# alone works fine, reporting errors as expected.
The text was updated successfully, but these errors were encountered: