News for hackers. Stuff that matters.
Re:Making the Most of the JavaScript Language (2016) by goatlover on Thursday August 03, 2017 @03:50PM (#14923141)
How does debugging in the browser console work when you use that approach?
Re:Making the Most of the JavaScript Language (2016) by Zyst on Thursday August 03, 2017 @04:00PM (#14923232)
Normally you have mapping files which tell your browser which bits correlate to the outputted "compiled" code.

Thus in your browser you see the code you write, you put in breakpoints as desired, and everything generally works.

I don't have much depth as to how it all works behind the scenes though, I'd love to know more.

Re:Making the Most of the JavaScript Language (2016) by daxelrod on Thursday August 03, 2017 @04:24PM (#14923494)
The feature is called "source maps". Here's an MDN article about it https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_...
Re:Making the Most of the JavaScript Language (2016) by whatever_dude on Monday August 07, 2017 @12:49PM (#14948937)
Like everyone said it works perfectly well with source maps. You get proper debug errors, break points, etc.

That said, it is another thing you need to maintaining and depending on the number of transformations your code has to go through, you introduce more points where the source map can break.