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

Problems with Chrome debugging in dev with webpack #520

Closed
docent opened this issue Feb 15, 2017 · 5 comments
Closed

Problems with Chrome debugging in dev with webpack #520

docent opened this issue Feb 15, 2017 · 5 comments

Comments

@docent
Copy link

docent commented Feb 15, 2017

By default, the generated webpack.dev.conf.js sets devtool: '#cheap-module-eval-source-map'. This causes problems with Chrome debugging because of vuejs/vue-cli#51. Changing devtool in the generated webpack.dev.conf.js to #source-map solves the issue. Is there any way to control the devtool setting from index.js? I see that for production webpack config it is set to config.build.productionSourceMap ? '#source-map' : false.

@sudo-suhas
Copy link
Contributor

I also faced issues while trying to debug in chrome with #cheap-module-eval-source-map. I was able to fix it by changing it back to #eval-source-map.

@dweremeichik
Copy link

I found that I had to use #cheap-eval-source-map due to it ignoring the source maps from loaders. Unfortunately it is transpiled code, but... at least I can trouble shoot what is going on now. For more information on the possible options for devtool see: https://webpack.js.org/configuration/devtool/

@madebycaliper
Copy link

I'm also experiencing this issue in Chrome using the default #cheap-module-eval-source-map and found it's corrected by using #cheap-eval-source-map.

But why was this issue closed @LinusBorg ? This thread and the others referenced don't provide any solution, just alternatives that apparently slow down compilation. Or did I miss something? If changing the devtool to #cheap-eval-source-map fixes this issue with no downside maybe vue-cli should be modified? I'm new-ish to Vue + Webpack so I could be misunderstanding...

@LinusBorg
Copy link
Contributor

LinusBorg commented Jan 10, 2018

  1. As you can read in the docs of webpack itself, source maps in chrome are generally wonky and nightmarish. They link this issue: [HELP WANTED] Perform source-map audit against webpack webpack/webpack#3165
  2. If something can be done to improve this general situation, it's not in this template repository
  3. I personally added #cheap-module-eval-sourcemap as a default to this template because it is a recommendation from the webpack docs and did work well for all tests that I did (around the time that I closed the issue), but that may differ for others because of 1.
  4. I closed the issue since a resolution to OPs problem was provided by two different people.

Basically, we can try and switch the template's default to something that seems to work at the time, but mostly it's trial and error for everyone because sourcemaps suck.

@madebycaliper
Copy link

@LinusBorg understood. Hopefully it'll get resolved upstream in webpack. Thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants