I'm generating inline sourcemaps for my JS using Gulp and gulp-sourcemaps and uglifying with gulp-uglify.
In the Chrome developer tools, when I visit the sources tab directly and click on my uglified/sourcemapped file, Chrome doesn't try to parse the sourcemap and just displays the uglified file.
However, when the console displays a message (such as from console.log
or an exception) with a link to the file and line number (e.g. app.js:81
), I can click on it and am taken to the sources tab of the dev tools, and the sourcemap is correctly parsed and the original file is shown.
Here's two screenshots where you can see the same file, one with the sourcemap parsed and one with it unparsed:
Am I doing something wrong here, or misunderstanding how sourcemaps are supposed to work? I want to be able to visit the sources tab directly and see the original file, not the uglified one.
Let me know if you need any more info.