kevin-mueller/HtmlCssClassCompletion

Visual Studio crashes when changing CSS class

Closed this issue ยท 5 comments

Hi,
I'm currently having a strange behavior if the extension is active, and I want to debug an application.

When debugging a Blazor Server application in Visual Studio 2022, Visual Studio crashes and restarts every time I update a CSS class.
After disabling the extension, changing a CSS class updates the application, which is the expected behavior.

I'm currently using Visual Studio 17.2.6. Hot reload is also activated

Hi @adrinamin,
I just tested this and can't seem to reproduce it.
Using VS2022 17.2.6, Hot-Reload enabled, Extension Version 1.13 and updating a css class while debugging a blazor server app works just fine. The ui updates, and the extension re-scannes for changed css classes.

Does this also happen to you when you try it in a completely new blazor server app? Or might there be a conflict with another extension?

Hi @kevin-mueller,
Thx for your response and for testing the issue.

So I tried two things which you mentioned:

  • I disabled all extensions except yours
  • I created a new Blazor server app

Visual Studio crashes after changing and saving a CSS file in both cases. I should add that the CSS file belonged to a razor component. So it wasn't a file in the wwwroot folder.

Do you know what else I could try to figure out the root cause of this issue?

Hi @adrinamin,
Sorry for the late anwser.

The only thing that I can think of that you could try, is to clone this repository and debug the extension yourself.

Just make sure that you have selected the "Visual Studio Extension Development" option in the Visual Studio Installer.

You can then open the solution from the HtmlCssClassCompletion22 folder.
Make sure it's the HtmlCssClassCompletion22 one. The other one is the old, VS2019 Version, which is barely working.

You can then debug the extension, like you would debug any other .NET application. This should open a new Experimental Instance of VS, where the extension is loaded. If it crashes, you might get an exception in the debugger, which could tell you more.

Don't know why I closed this... Reopen for obvious reasons.

So I updated to the latest Visual Studio Version 17.3.4, and now I cannot reproduce the issue anymore ๐Ÿ˜† . Therefore I'm closing the issue.