Closed
Description
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
AlmeroSteyn commentedon Dec 7, 2016
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.
gaearon commentedon Dec 7, 2016
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.
AlmeroSteyn commentedon Dec 7, 2016
@gaearon Upgrading to 1.14.0 seems to work for me.
markerikson commentedon Dec 7, 2016
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 thedevtool
option as far as I've seen.)