Recently I faced a very nasty problem with source mapping using grunt-contrib-concat. Grunt-contrib-concat concatenates several .js files into one and uses source-map module for source mapping. So breakpoints in my code paused incorrectly both in Chrome and in VS Code. (You know what is it, if you faced the same problem). My environment: Windows 10, VS Code with Debugger for Chrome extension, Chrome browser, Node.js project with grunt-contrib-concat dependency. It is very unefficient to debug your client-side code without correct breakpoints.
Wrong source map for concatenated .js file in grunt-contrib-concat
218 Views Asked by Inflight At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in ANGULARJS
- Angular Show All When No Filter Is Supplied
- Using pagination on a table in AngularJS
- State with different subviews
- Getting and passing MVC Model data to AngularJS controller
- Implementing prerender.io middleware in sails.js
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- AngularJS, Google App Engine and URLrewrite
- send data from table to another page into forms
- How to write tests for classes with inheritance
- angularJS sending OPTIONS instead of POST
- Receiving POST from external application in AngularJS
- Metaprogramming AngularJS Filters
- Reload List after Closing Modal
- Why is my angularjs site not completely crawlable?
- Why is separation of JavaScript and HTML a good practice?
Related Questions in SOURCE-MAPS
- Debugging GWT app in production by loading SourceMaps from local environment
- Sourcemaps content same as compiled output - on Windows
- Keeping LESS sourceMaps for minified css with cssmin
- How do I generate sourcemaps when using babel and webpack?
- Copy map file on grunt with sass
- How can I get rid of the error "Unsupported format of the sourcemap" while loading jquery-migrate.min.js?
- Source Map Behavior -- how to view original javascript before minification
- `Invalid mapping` error trying to use babel require hook and polyfill with react jsx transpile
- Enable JavaScript debugging with IntelliJ and source maps
- Webpack SCSS - Wrong file and line in sourcemap
- Ionic 2 Missing source to debug on ios device
- Webpack's devtool (source-map) option not working while debugging popup.html of a chrome-extension
- Syntax highlighting for java on chrome dev tool not working
- How to prevent karma-webpack from creating source maps of vendor code?
- gulp sass sourcemap pointing to wrong file
Related Questions in GRUNT-CONTRIB-CONCAT
- grunt-contrib-concat concat goal sourcemap option is not working (windows)
- Grunt Warning: Task "concat" not found
- Add grunt to an existing App built on AngularJS
- Is it possible to pass a sourcemaps to grunt-ng-annotate?
- grunt failing due to parse error from commented out code
- Concatenating php files and Javascript with Grunt.js
- How to make couple of minified files from different js files using grunt
- grunt usemin 2 different concat configs for js and css
- grunt build css encoding
- If on a website, only one page uses a javascript file, should it be loaded on all pages?
- GruntJS Concat don't work (Maximum call stack size exceeded)
- Grunt outputs an empty .js-file after concatting
- Grunt concat files on a different domain or on different server
- bower add Jquery UI theme in style
- Wrong source map for concatenated .js file in grunt-contrib-concat
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I have spent several hours to clear the problem, and finally I have found the solution. Problem was in concatenate minified .js files. After these minified files line numbers in source map become wrong. So the solution is to exclude minified files and use normal instead.