dotnet / project-system-tools

Tools for working with the C#/VB/F# project system.
MIT License
272 stars 42 forks source link

Log workspace kind and document client name #411

Closed davidwengier closed 3 years ago

davidwengier commented 3 years ago

FYI @NTaylorMullen and @dibarbet, this should hopefully help tracking down some LSP/Razor issues.

Certainly would be useful in an issue currently being looked at :)

dibarbet commented 3 years ago

@davidwengier is this related to https://github.com/dotnet/roslyn/issues/54547#issuecomment-883116301

davidwengier commented 3 years ago

Not intentionally :)

@NTaylorMullen is investigating an issue that we originally thought could fixed by my project system changes, but the workspace log confirmed that Roslyn knew about the Razor document. The only other explanation I could see for the LSP server not finding it would be if there wasn't a client name associated to it (or the platform has a bug where its not sending the client name properly), but there isn't a way to confirm that. So now there is.

dibarbet commented 3 years ago

The only other explanation I could see for the LSP server not finding it would be if there wasn't a client name associated to it

That also matches the scenario I hit under the debugger on that issue, the document missing the client name service. Maybe we should consider adding this to the loghub logs on the roslyn side when we lookup the document (aka record how many documents we found before we filtered by client name).

davidwengier commented 3 years ago

Taylor is looking at a dump file now and it does seem to be the same, yes. More logs would be good, its only lucky that this was an internal user so we were able to get them to install the extension etc. "Found the document, but not for the client name 'X'" would be very useful info, because we also don't seem to log the client name, so we can't see if its Roslyn or platform that is wrong.

davidwengier commented 3 years ago

Thanks Drew!