glimmerjs / glimmer-vm

MIT License
1.13k stars 191 forks source link

Source mapping is working strangely #458

Open linclark opened 7 years ago

linclark commented 7 years ago

I mentioned this on twitter yesterday, and @wycats asked that I file an issue. I was attempting to step through the VM code. I was using glimmer-api-docs as my demo app.

The source map seems to be a little wonky. I wasn't able to get it to hit breakpoints. I thought it could be user error and that I just wasn't putting them in the right place. But in some places the breakpoints seem to slide to lines they shouldn't be. For example, in the gif below I'm trying to put a breakpoint on code lines 153/154, but it keeps sliding to a comment.

2017-04-10 20_43_24

It's giving me the "Pretty-print this minified file?" message, even though I've already clicked the {} (the gif shows that the {} isn't displayed anymore) and the tab says append.js:formatted.

Let me know if you need any other info.

rwjblue commented 7 years ago

Awesome, thank you for reporting!

pittst3r commented 7 years ago

Here is another example of sourcemaps not working properly:

screen shot 2017-04-10 at 7 13 44 pm

The call stack is correct but the file names and line numbers aren't, so when you click on one of the functions in the call stack you go to the wrong place. Also notice that there are many greyed out lines in the source view and that they are incorrect.