Blazor webassembly does not hit breakpoints on <select> bindings
When debugging blazor webassembly breakpoints are not beeing hit if call is originating form a <select> @bind.
Example:
@page "/"
<select class="form-control form-control-sm" @bind="Color">
<option value="Blue">Blue</option>
<option value="Black">Black</option>
</select>
<input type="number" @bind="Value" />
@code{
string _color;
string Color
{
get
{
return _color;
}
set
{
Console.WriteLine("SET 'Color'. This will NOT be hit !");
System.Diagnostics.Debugger.Break();
if (_color != value)
{
_color = value;
}
}
}
decimal? _value;
decimal? Value
{
get
{
return _value;
}
set
{
Console.WriteLine("SET 'Value'. This WILL be hit !");
System.Diagnostics.Debugger.Break();
if (_value != value)
{
_value = value;
}
}
}
}
Confirmed this is happening for me too. Works fine in a server app, and its not a tooling issue (breakpoints bind correctly etc.). Suspect this is an issue in the Blazor WASM javacsript framework bits. Moving to runtime.
Tagging subscribers to this area: @thaystg See info in area-owners.md if you want to be subscribed.
Hi, is your project targeting .net9? Can you please install VS 17.11 Preview 2 and enable this option? "Enable new .NET 8+ Mono debugger (preview)" Please let me know if it works.
This is fixed using the new debugger.