Is there a way to debug a bundled javascript in WebStorm setting breakpoints in the files that are source for bundling, instead of the bundle itself?
I use browserify
as bundling package, but I can consider using other ones. The only limitation is that I use grunt
as a task runner. Seems there is something that could be a solution here, but it us for gulp
. There mentioned vinyl-source-stream
as a part of the solution, but I am not sure if it is worth trying with grunt
.
What I tried is
- using
browserify: { options: { debug: true; } }
- using
mold-source-map
and some other related things found here on SO - using
uglify
as source map generator - some other things that are not worth mentioning
Any one- or two-step things I tried just did not work.
Seems it is too sophisticated to search the way consciously, only try-and-error would work, but I don't have enough time for it.
What I hope to find is a working example of the web storm project where I can set a breakpoint in source js before debugging. But any hint or direction would be appreciated.
Well, if nobody helps me and I find the solution later, I'll surely blog it out as step-by-step instruction. But I am not sure that this is possible due to people who understand more than me in browser debugging told that source map cannot be generated so as to point to the files other that actually executing in browser js engine. So the answer with more detailed explanation why it is not possible can also be accepted.