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

Chrome Debugger/source maps are inaccurate #3911

Closed
oriooctopus opened this issue Dec 13, 2020 · 2 comments · Fixed by #4089
Closed

Chrome Debugger/source maps are inaccurate #3911

oriooctopus opened this issue Dec 13, 2020 · 2 comments · Fixed by #4089
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@oriooctopus
Copy link
Contributor

oriooctopus commented Dec 13, 2020

🐛 Bug Report

When using the chrome debugger, it maps to a much earlier line

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Swizzle DocSidebar (it could be any component, and I believe there would still be this error)
  2. Add a debugger statement (Mine was on line 202, right before the return)

You would expect it to highlight here:
Screen Shot 2020-12-12 at 10 23 27 PM

But instead if starts here:
Screen Shot 2020-12-12 at 10 19 05 PM

Your Environment

I ran npx @docusaurus/init@latest init my-website classic on the newest version, although I don't think it's due to any recent change... I've had this issue for at least 6 months

@oriooctopus oriooctopus added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 13, 2020
@ta11ey
Copy link

ta11ey commented Apr 14, 2021

Recently had this same issue and fixed it by extending the custom webpack with

devtool: "source-map",

@slorber
Copy link
Collaborator

slorber commented Apr 15, 2021

going to close this with PR migrating to webpack 5: #4089

let me know if you still have the issue after we migrate to webpack5

@slorber slorber linked a pull request Apr 15, 2021 that will close this issue
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants