Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect line numbers in some projects #4

Open
dankoster opened this issue Jun 10, 2024 · 1 comment
Open

Incorrect line numbers in some projects #4

dankoster opened this issue Jun 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dankoster
Copy link
Owner

In some projects React reports incorrect source file line numbers.

  • The reported line number is always less than the actual line number
  • This bug occurs in some projects but not others: It could be a build pipeline config issue?
  • This is probably due to the code being modified by a linting or pretification step of the build processes occurring before typescript transpilation, causing source mappings to be generated "incorrectly" for the partially processed code instead of for the actual code.
Screen.Recording.2024-06-10.at.3.07.13.PM.mov
@dankoster dankoster added the bug Something isn't working label Jun 10, 2024
@dankoster
Copy link
Owner Author

Further research into the react devtools source revealed that reporting of this debug info is currently in flux with the reporing mechanism being worked on to eventually support any code where source maps are available (including prod!) using the stack trace provided by a thrown exception.

facebook/react#28265
facebook/react#28351
facebook/react#29164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant