aspnetcore
aspnetcore copied to clipboard
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;
}
}
}
}