Search code examples
javascriptgoogle-chromemeteorsource-maps

How can I check "source map"/"transpiled javascript" consistency?


Chrome inspector (and Firefox) does not offer proper debugging :(

  1. I'm dealing with fuzzy breakpoints:

Chrome break points

  1. Variables highlights are inconsistent:

enter image description here

  1. Stepping over next function call jumps to random places

  2. Formatting js code does not solve the issue

Does it have anything to do with the source map?

Looks like it's a YES

I'm using Meteor 1.5 and Chrome 58. I have both the javascript transpiled source and the source map. How can I check that they are consistent?

I've brutally opened both files and compared them:

  • javascript source

    ./local/build/programs/web.browser/app/app.js
    https://pastebin.com/XEgCzFDd
    
  • source map

    ./local/build/programs/web.browser/app/app.js.map
    https://pastebin.com/sMhBfvQg
    

Also posted on meteor forums: https://forums.meteor.com/t/incorrect-source-maps/37234


Solution

  • Thanks to the awesome answer https://stackoverflow.com/a/44218630/1435156 of @MasterAM, I've managed to downgrade Meteor back to 1.4.3.2 and the debugger is functional again.

    See https://github.com/meteor/meteor/issues/8611#issuecomment-308388209