Skip to content

Breakpoints not working after adding sourcemaps in 0.8.x #1186

Closed

Description

@gaearon

Per @markerikson they don't always work.

https://twitter.com/acemarke/status/806353019902316545

We need reproducing cases to get to the root of the issue. If you can show code in which breakpoints are broken this would help.

If we don't fix them I intend to revert the sourcemaps change. We can't break breakpoints. But I hope we'll solve this instead.

Activity

  1. AlmeroSteyn commented on Dec 7, 2016

    @AlmeroSteyn
    Contributor

    I had exactly the same issue today.

    I fixed my problem by adding new webpack.EvalSourceMapDevToolPlugin() to the plugin sections of both the development and production configs. After doing that, I am able to set and hit breakpoints in the ES6 source in Chrome DevTools.

    Found the solution in the post here.

    If this is an accepted fix I can submit a pull request.

  2. gaearon commented on Dec 7, 2016

    @gaearon
    ContributorAuthor

    Thanks for the comment. That feels like an odd fix so I'd rather not apply it without a full understanding of why this works.

    But if you can reproduce this in your project, can you try updating Webpack to 1.14.0? It should contain a fix for a possibly related issue.

  3. AlmeroSteyn commented on Dec 7, 2016

    @AlmeroSteyn
    Contributor

    @gaearon Upgrading to 1.14.0 seems to work for me.

  4. markerikson commented on Dec 7, 2016

    @markerikson

    Heh. I was debating whether to file an issue or not, but it was late and I was curious if @TheLarkInn had anything to say first.

    I see that #1188 is tagged for 0.8.2, so I'll look forward to that. Thanks for looking into this!

    (Side note: having looked at the Webpack 1.x code for handling the devtool config option, what it actually does is parse strings like "#cheap-module-inline-source-map", and turn that into several distinct variables, such as the prefix character, inline vs eval, etc. Part of that process is deciding whether to use SourceMapPlugin or EvalSourceMapPlugin. Also, manually adding a sourcemap plugin instance to the plugins array will wind up overriding the one created from the devtool option as far as I've seen.)

  5. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions