from–https://stackoverflow.com/questions/46697906/debugging-vue-js-2-in-webstorm
10
Problem is that debugger not only stepping into the right source files but also its stepping into app.js file which is autogenerated by Webpack. How can I prevent it from doing that ?
I have following setup:
I initiated Vue.js 2 app using vue-cli
. My debugging configuration looks like this:
I also added this line to "webpack.dev.conf.js"
; devtool: "source-map"
,
And I also added app.js file to exceptions in the debugger config:
I start server using npm run dev
command, and then starting debugging session from WebStorm. Problem still exists. Any ideas ?
2 Answers
4
Please check on the following two points:
- Change the
devtool
configuration to value'eval-source-map'
or'#eval-source-map'
(I don’t know the difference between adding ‘#’ sign or without ‘#’ sign, but I tested both can work as expected) in your effective webpack configuration file. - Add debug configuration just as the same step of yours. When you click that debug configuration from WebStorm, the system will automatically popup one window(Google Chrome or Firefox), please make sure you only doing your debug from this page, only the action triggered in this page is synchronized with your WebStorm Editor. This is very important!
It works from my dev env now.
- 2This worked for me, but I did need to add the source mapping
webpack:///./src
to thesrc
directory.
3
Use devtool: 'eval-source-map'
instead
Oct 12, 2017 at 13:01
Aug 6, 2019 at 7:44