Skip to content
This repository has been archived by the owner on Nov 10, 2019. It is now read-only.

Source maps aren't right #19

Closed
jdcrutchley opened this issue May 17, 2015 · 1 comment
Closed

Source maps aren't right #19

jdcrutchley opened this issue May 17, 2015 · 1 comment

Comments

@jdcrutchley
Copy link

Could be I did something wrong, but I've tried several methods. Here's the simplest:

  1. Clone this repo.
  2. Copy the Html Starter Kit example directory to a temp directory.
  3. Modify gulpfile.js so durandal = require('gulp-durandal') instead of require('../../index').
  4. From temp directory, npm install gulp, gulp-durandal, gulp-rename, etc.
  5. Run gulp
  6. Browse to resultant index.html (simple version, not almond) using Chrome.

Results:

I can see the source files under app/views and app/viewmodels in Chrome's dev tools sources tab. The main.js file shown there shows the source for the concatenated file. Breakpoints don't seem to line up with where I put them. Sometimes I'll try to set a breakpoint for a line and it'll jump down a few lines and put a breakpoint there. When it does let me put one where I wanted, when I actually run the app it breaks somewhere else. It appears the generated source map isn't correct and is mapping the real code back to incorrect locations in the source.

Please tell me I've just done something wrong in my setup - though I've tried MANY different variations with consistent results.

@jdcrutchley
Copy link
Author

Found the reason for this was in node: nodejs/node-v0.x-archive#25342.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant