Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

This shows the stack trace of the JSX at each level so now you can also jump to the code location for the JSX callsite. The visual is similar to the owner stacks with createTask except when you click the <...> you jump to the Instance in the Components panel.

Screenshot 2025-08-08 at 12 19 21 AM

I'm not sure it's really necessary to have all the JSX stacks of every owner. We could just have it for the current component and then the rest of the owners you could get to if you just click that owner instance.

As a bonus, I also use the JSX callsite as the fallback for the "View Source" button. This is primarily useful for built-ins like <div> and <Suspense> that don't have any implementation to jump to anyway. It's useful to be able to jump to where a boundary was defined.

This is the debug stack that makes up the owner stack. I.e. the stack of
the JSX call.

Exclude if it has no owner since we don't use the root in owner stacks.
@sebmarkbage sebmarkbage requested review from eps1lon and hoxyq August 8, 2025 04:23
@meta-cla meta-cla bot added the CLA Signed label Aug 8, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 8, 2025
…e location exists

This is useful to jump to the creation of a built-in like <div> or <Suspense>.
@sebmarkbage sebmarkbage force-pushed the devtoolsownerstacks branch from 217d04e to 7623ef2 Compare August 8, 2025 04:27
@sebmarkbage sebmarkbage force-pushed the devtoolsownerstacks branch from 7d41b15 to 113825e Compare August 8, 2025 05:26
@sebmarkbage sebmarkbage merged commit 7a934a1 into facebook:main Aug 11, 2025
241 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants