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

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

Closed
gaearon opened this issue Dec 7, 2016 · 4 comments · Fixed by #1188
Closed

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

gaearon opened this issue Dec 7, 2016 · 4 comments · Fixed by #1188

Comments

@gaearon
Copy link
Contributor

gaearon commented Dec 7, 2016

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.

@AlmeroSteyn
Copy link
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.

@gaearon
Copy link
Contributor Author

gaearon commented 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
Copy link
Contributor

@gaearon Upgrading to 1.14.0 seems to work for me.

@markerikson
Copy link

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.)

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants