I have a blazor Web App on .Net 9. I am using InteractiveWebAssemblyRenderMode with prerender: false.
I am seeing weird inconsistent behavior with breackpoint not getting hit from VS 2022.
I have a razor class library solution where I have created a component. Overridden OnInitialized(), OnParameterSet(), OnAfterRender() etc. Published this using Nuget package. Then in a 2nd project which is Blazor Web App, I am using this component.
Surprisingly, I am seeing often the breakpoint on the component class is not getting hit. The behavior is very random. Sometime some of the method breakpoints get hit. But once it is hit. I close the app and run next time without any change, now the breakpoints are not hitting. Although it is not getting hit, the functionality seems working fine.
- Verified the breakpoints are getting attached
- Tried with different browsers chrome, edge
- Tried clearing browser site data from Dev tool Application. Still inconsistent behavior.
- Sometime it is getting hit after build but as I navigate from the page and come back, it is not getting hit.
Any help would be appreciated on such inconsistent behavior during debugging.