-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Blazor WASM debugger faults when stepping through code #49218
Comments
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsDescribe the bugStepping through code causes fault (failed assertion) in mono. To Reproduce
Expected ResultsThe debugger will step over the current statement Actual ResultsThe debugger becomes unusable and must be restarted. CommentsThe problem appears to be caused by the expression Foo.csusing System;
using System.Linq;
using System.Collections.Generic;
namespace BlazorBugsLib
{
public class Foo
{
//public string Bar => "sample-data/weather.json";
public string Bar => Stuffs.First(x => x.Name.StartsWith('S')).Name;
public string Lorem { get; set; } = "Safe";
public string Ipsum { get; set; } = "Side";
public Something What { get; } = new Something();
public List<Something> Stuffs { get; } = Enumerable.Range(0, 10).Select(x => new Something()).ToList();
public int Bart()
{
int ret;
if (Lorem.StartsWith('S'))
ret = 0;
else
ret = 1;
return ret;
}
}
} FetchData.razor protected override async Task OnInitializedAsync()
{
Console.WriteLine(new BlazorBugsLib.Foo().Bart());
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("Bad URI");
} Output Window
|
Tagging subscribers to this area: @thaystg Issue DetailsDescribe the bugStepping through code causes fault (failed assertion) in mono. To Reproduce
Expected ResultsThe debugger will step over the current statement Actual ResultsThe debugger becomes unusable and must be restarted. CommentsThe problem appears to be caused by the expression Foo.csusing System;
using System.Linq;
using System.Collections.Generic;
namespace BlazorBugsLib
{
public class Foo
{
//public string Bar => "sample-data/weather.json";
public string Bar => Stuffs.First(x => x.Name.StartsWith('S')).Name;
public string Lorem { get; set; } = "Safe";
public string Ipsum { get; set; } = "Side";
public Something What { get; } = new Something();
public List<Something> Stuffs { get; } = Enumerable.Range(0, 10).Select(x => new Something()).ToList();
public int Bart()
{
int ret;
if (Lorem.StartsWith('S'))
ret = 0;
else
ret = 1;
return ret;
}
}
} FetchData.razor protected override async Task OnInitializedAsync()
{
Console.WriteLine(new BlazorBugsLib.Foo().Bart());
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("Bad URI");
} Output Window
|
@lewing FYI |
we've updated the stepping logic, this may be resolved. |
It's fixed. |
* Creating test to close 49143. * Creating test to close #49141 * Adding test for #49218. * Fix behavior of step to be the same of what we see when debugging using debugger-libs+mono or coreclr. Fix error message of evaluate calling methods. Adding test for #49142 * Improving test to test what @radical asked. * Changing what was suggested by @radical.
Describe the bug
Stepping through code causes fault (failed assertion) in mono.
To Reproduce
Foo
class to the library with the code belowFetchData.razor
page with the code below.FetchData.razor:42
(Console.WriteLine...
)this.Bar
to the watch window.FetchData.razor
page. Press F5 to continue.FetchData.razor
page. Press F11 twice to Step Into.Expected Results
The debugger will step over the current statement
Actual Results
The debugger becomes unusable and must be restarted.
Comments
The problem appears to be caused by the expression
this.Bar
in the watch window: I'm unable to reproduce the error when the expression is removed.Foo.cs
FetchData.razor
Output Window
The text was updated successfully, but these errors were encountered: