![]() You can view it in action in the gif below, with a CoffeeScript file: Source map support in the console The console will now show the original source, and not the compiled one anymore. This meant that any logged message had its location (the file and the line the log was emitted from) point to the compiled JavaScript file, but if said file was long and/or minified, this location info was barely usable. ![]() Source maps were supported in the debugger, but not in the console till now. Source maps allow you to compact all your JavaScript files in one script in order to save download time for your users, or to compile from another format (like TypeScript or CoffeeScript) to Javascript, while maintaining a reference to the original files, so it’s not a nightmare to debug. So, a big thanks to Firefox Developer Tools’ intern Jaideep Bhoosreddy for figuring it out. “Interns often don’t have all the background on how difficult bugs are, and sometimes jump into really challenging bugs-which is to say, yay interns! ” If you’re curious as to why this has been such a challenging issue, James Long wrote an excellent post on the matter: On the Road to Better Sourcemaps in the Firefox Developer ToolsĬurious how the solution came about? I’ll paraphrase our own Joe Walker, The source maps feature is currently preffed off by default, as we test before shipping it to everyone. It also introduces something special we’ve all been really wanting for a while, so let’s get right to it: ConsoleĪ long awaited feature is finally coming to the dev tools, but we need your help in this final phase of testing. It has numerous improvements that will help you work with script-initiated network requests, tweak indexedDB data, and much more.
0 Comments
Leave a Reply. |