Make react dev tools begin profiling immediately after navigating to the site?

30 Views Asked by At

I'm trying to use react dev tools profiler to debug an extra re-render which happens immediately after the user returns to the site after logging in through an third-party IDP. I can't figure out how to start the profiler in time to catch this event.

What happens is:

  1. User clicks "login" on my page
  2. User gets redirected to identity provider site, does their login stuff
  3. Identity provider site authenticates and redirects back to my page
  4. My page begins to render (I can see some elements appear), but then it becomes blank white, and then it renders normally.

Because step 2 involves another website, the profiler stops if I start it during step 1. Step 4 happens so quickly I can't hit the "start recording" button in the profiler before its over.

I've tried putting breakpoint in my code so that I could start the profiler before my code runs, but no matter where I put the breakpoint, react dev tools says "Profiling not supported. Profiling support requires either a development or profiling build of React v16.5+." The profiler works on the page when it's not stopped a breakpoint however.

Is there any way to make the profiler work in this situation?

0

There are 0 best solutions below