-
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 doesn't correctly step through code when debugging #49141
Comments
Tagging subscribers to this area: @tommcdon Issue DetailsDescribe the bugStepping through code acts unpredictably, sometimes skipping over expressions that should be hit. WorkaroundYou can guarantee that code will stop on a given line by adding a breakpoint. Because STEP OVER acts so unpredictably, adding a breakpoint is really the only way you can guarantee that your code is going to stop on a given line. To Reproduce
Expected ResultsThe currently executing line will progress will progress to the line with Actual ResultsThe debugger steps out of the function Foo.csusing System;
using System.Linq;
using System.Collections.Generic;
namespace BlazorBugsLib
{
public class Foo
{
public string Lorem { get; set; } = "Safe";
public int Bar()
{
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().Bar());
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("Bad URI");
}
|
Thanks for detailed issue report, @RobertBouillon. |
Tagging subscribers to this area: @thaystg Issue DetailsDescribe the bugStepping through code acts unpredictably, sometimes skipping over expressions that should be hit. WorkaroundYou can guarantee that code will stop on a given line by adding a breakpoint. Because STEP OVER acts so unpredictably, adding a breakpoint is really the only way you can guarantee that your code is going to stop on a given line. To Reproduce
Expected ResultsThe currently executing line will progress will progress to the line with Actual ResultsThe debugger steps out of the function Foo.csusing System;
using System.Linq;
using System.Collections.Generic;
namespace BlazorBugsLib
{
public class Foo
{
public string Lorem { get; set; } = "Safe";
public int Bar()
{
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().Bar());
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("Bad URI");
}
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescribe the bugStepping through code acts unpredictably, sometimes skipping over expressions that should be hit. WorkaroundYou can guarantee that code will stop on a given line by adding a breakpoint. Because STEP OVER acts so unpredictably, adding a breakpoint is really the only way you can guarantee that your code is going to stop on a given line. To Reproduce
Expected ResultsThe currently executing line will progress will progress to the line with Actual ResultsThe debugger steps out of the function Foo.csusing System;
using System.Linq;
using System.Collections.Generic;
namespace BlazorBugsLib
{
public class Foo
{
public string Lorem { get; set; } = "Safe";
public int Bar()
{
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().Bar());
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("Bad URI");
}
|
cc @radical |
@thaystg is this fixed now? |
Yes. |
* 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 acts unpredictably, sometimes skipping over expressions that should be hit.
Workaround
You can guarantee that code will stop on a given line by adding a breakpoint. Because STEP OVER acts so unpredictably, adding a breakpoint is really the only way you can guarantee that your code is going to stop on a given line.
To Reproduce
Foo
class to the library with the code belowFetchData.razor
page with the code below.Bar
method of theFoo
class on the line withret = 0
Foo
class.Expected Results
The currently executing line will progress will progress to the line with
return ret;
Actual Results
The debugger steps out of the function
Foo.cs
FetchData.razor
The text was updated successfully, but these errors were encountered: