AvaloniaUI / AvaloniaVSCode

Visual Studio Code Extension for Avalonia UI
https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.vscode-avalonia
MIT License
103 stars 18 forks source link

Preview fail silently if compilation fail or unhandled error occur #112

Open Mrcubix opened 9 months ago

Mrcubix commented 9 months ago

Describe the bug

Related to #111, Extension will currently not display a notification when compilation fails or when an unhandled error in the extension itself occur. A book worth of errors and exception can however be found in the logs.

To Reproduce

This is only an example, there are many ways to reach the same result.

  1. Try adding a background to a control or a view you are trying to preview, for example :
<Design.PreviewWith>
  <views:BindingsOverview Background="{StaticResource BodyColorBrush}" />
</Design.PreviewWith>

(Source accessible by prashantvc here

  1. Try to preview that element,
  2. Previewing failed, you find yourself with an empty preview, no notifications & a wall of logs such as the one in Relevant log output

or

try to preview a control with invalid syntax anywhere.

Avalonia for VS Code

0.0.31

Avalonia version

11.0.4 - 11.0.9

VS Code version

1.85.2

Relevant log output

https://gist.github.com/Mrcubix/ef331e50cd2d84c7e1f09f87de56d856

Additional context

image