-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Milestone
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
Fooclass to the library with the code below - Add a reference to the .NET library project from the WASM project
- Update the
FetchData.razorpage with the code below. - Add a breakpoint in the
Barproperty - Start debugging
- Click on the "Fetch Data" link in the window
- The program should break in the
Fooclass. 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);
}gregsdennis