-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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 map to wrong line in chrome #51
Comments
Is the code inside a |
Yes. I'm (almost) sure all of them had the issue. |
Node and npm version - npm: '2.14.7', node: '4.2.3' |
Do you have hot reloading enabled? I was also experiencing this issue where the source maps were not in sync with the code, and sometimes even though chrome would break on the right line, it would sometimes not match up in the sources view. I will investigate whether this is a webpack issue or a chrome issue. But either way I am not sure if this is |
Have a look at the table from this documentation, specifically "quality" column. |
@nioufe @skyronic Any luck resolving this? Was @azamat-sharapov's suggestion helpful? |
@azamat-sharapov Changing from "eval-source-map" to "source-map" solved the issue. I'll try "eval" to see how it works. Hopefully i'll come back with better answers. @skyronic I agree, this doesn't look like a vue-cli issue, maybe vue-loader? I'm not familiar with how it works =/ |
@nioufe Any further word? |
I'm still trying (from time to time) to find where this is coming from. With "#eval-source-map", breakpoints are broken across browsers. I tried with vue-cli/vue-loader latest versions and only random breakpoints work. Most of the time they don't get triggered. With "#source-map", only breakpoints in the first lines of a file seem to be broken. I found a Babel 6 issue which could explain this : https://phabricator.babeljs.io/T7210 Maybe this is two different issues. I'm starting to learn how webpack/vue-loader/babel interact to try to pinpoint exactly which one is guilty. |
@nioufe Thanks for your continued research into this! It sounds like you're zeroing in on it. 🙂 |
Closing due to inactivity, please open new issue if there's more information available. |
Hello,
I've been trying to get my breakpoints in chrome to show the proper line while debugging an app generated with vue-cli. Usually the problem I have is : The breakpoint stops execution properly but my app really is 2 lines up or down.
An example :
var a = 1;
a++; <-- breakpoint
a++;
When chrome stops execution, a is either 1 or 3 instead of 2.
I figured the problem should come from webpack, and found that changing :
config.devtool = 'eval-source-map' to config.devtool = 'source-map' solves the issue. (And also has easier names for files when debugging).
I tried to understand how the change solved the issue but no luck there... I'm still a beginner with webpack.
The text was updated successfully, but these errors were encountered: