Skip to content

Chrome Debugger/source maps are inaccurate #3911

Closed

Description

@oriooctopus

🐛 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

Activity

  1. added
    bug
    status: needs triage
    on Dec 13, 2020
  2. talgard commented on Apr 14, 2021

    @talgard

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

    devtool: "source-map",
    
  3. slorber commented on Apr 15, 2021

    @slorber
    Collaborator

    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

  4. linked a pull request that will close this issuefeat(v2): Webpack 5, PostCSS 8 #4089on Apr 15, 2021
  5. removed
    status: needs triage
    on Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions