❔ Blazor WebAsm (.NET6) Breakpoints No Longer Working
I had them working a few months ago before I took a break from the project but now they simply don't work at all. They used to work only on microsoft edge (had help with setting it up) and now i'm struggling to test my frontend blazor code (the json string works on swagger but cannot properly test whats going wrong because of no breakpoints).
Anyone have an idea on what I should do with this situation to figure out how to get them working again? I don't even know where to begin. Not sure if its my project, visual studio, my browser, or something else.
https://github.com/Metalkon/Fantasy-Web-App/tree/auth-refreshtokens/Fantasy%20Blazor
10 Replies
when does this code run?
Blazor WASM has never supported breakpoints on startup
and from my understanding, debugger support has always been its best with Chrome, strangely enough
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.It's a passwordless auth setup that only uses email. Logging in sends an email to the user, which contains a magic link for this page in the screenshot with the email/code in it's url. This page grabs the informaiton from the current url and sends that http request to confirm login and recieve jwt/refresh. As soon as the page is loaded it runs the method for the request.
so, this method runs immediately on load of the page?
Blazor WASM does not support breakpoints on startup
the .NET Runtime has to bootstrap within the browser, and then establish a socket connection to the debugger, in order for breakpoints to work
I.E.
breakpoints do not work until after your app bootstraps itself
if they were working before, you probably have a bit of a race condition going on
so it should work if i'm testing without oninitialized I assume and the page is already loaded?
tried breakpoint again with a test button that does everything and im getting this
what are we looking at?
that comes up in lieu of a breakpoint?
made a video earlier
https://www.youtube.com/watch?v=Tyn4hIbURp4
no idea
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.