-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watch window does not execute ToString() on objects #49143
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @thaystg Issue DetailsDescribe the bugThe watch window doesn't execute the To Reproduce
Expected ResultsThe Actual ResultsThe Foo.csusing 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);
}
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescribe the bugThe watch window doesn't execute the To Reproduce
Expected ResultsThe Actual ResultsThe Foo.csusing 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);
}
|
cc @radical |
It doesn't support calling any methods yet (#45596). |
It's working. |
Describe the bug
The watch window doesn't execute the
ToString()
method in Blazor WASM, which is valuable in debugging to inspect identifying properties of an object without having to expand it, especially when the objects are members of a collection.To Reproduce
Foo
andSomething
classes to the library with the code belowFetchData.razor
page with the code below.Bar
propertyFoo
class. Open the locals WindowExpected Results
The
What
property shows the result ofToString
(Name of Something
)(Image shown is the locals window when the same value is viewed from a console project)
Actual Results
The
What
property shows the name of the type (BlazorBugsLib.Something
)Foo.cs
FetchData.razor
The text was updated successfully, but these errors were encountered: