Closed
Description
Describe the bug
Watch window does not show the value of properties for Blazor WASM projects, requiring you instead to navigate to and expand each property to see its value.
To Reproduce
- Create a new Blazor WASM project
- Add a new .NET library project to the solution
- Add the
Foo
class to the library with the code below - Add a reference to the .NET library project from the WASM project
- Update the
FetchData.razor
page with the code below. - Add a breakpoint in the
Bar
property - Start debugging
- Click on the "Fetch Data" link in the window
- The program should break in the
Foo
class. Open the locals Window
Expected Results
this.Bar
will show the value sample-data/weather.json
(Image shown is the locals window when the same value is viewed from a console project)
Actual Results
this.Bar
shows 𝑓 Bar() {}
and requires you to expand the property to view the value
Foo.cs
using System;
namespace BlazorBugsLib
{
public class Foo
{
public string Bar => "sample-data/weather.json";
public string Lorem { get; set; } = "Safe";
public string Ipsum { get; set; } = "Side";
public Something What { get; } = new Something();
}
public class Something
{
public string Name { get; set; }
public Something() => Name = "Name of something";
public override string ToString() => Name;
}
}
FetchData.razor
protected override async Task OnInitializedAsync()
{
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>(new BlazorBugsLib.Foo().Bar);
}