Confirmed users
125
edits
No edit summary |
No edit summary |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{FeatureStatus | {{FeatureStatus | ||
|Feature name=SourceMap | |Feature name=SourceMap | ||
|Feature stage= | |Feature stage=Landed | ||
|Feature status=In progress | |Feature status=In progress | ||
|Feature version= | |Feature version=23 | ||
|Feature health=OK | |Feature health=OK | ||
|Feature status note= | |Feature status note=Initial support landed in Firefox 23. Improvements coming down the pipe as always. | ||
}} | }} | ||
{{FeatureTeam | {{FeatureTeam | ||
|Feature feature manager=Dave Camp | |||
|Feature feature manager= | |||
|Feature lead engineer=Nick Fitzgerald | |Feature lead engineer=Nick Fitzgerald | ||
|Feature qa lead=Vlad Maniac | |||
}} | }} | ||
{{FeaturePageBody | {{FeaturePageBody | ||
Line 26: | Line 26: | ||
A user can take .js source files and compress them with the Closure Compiler. Errors and log messages in the Web Console will refer to the original .js files. | A user can take .js source files and compress them with the Closure Compiler. Errors and log messages in the Web Console will refer to the original .js files. | ||
Case 2: | Case 2: Languages which compile to JavaScript | ||
You can start with | You can start with an original file which contains any language that compiles to JS (for example, CoffeeScript). Any logged output or uncaught errors will refer back to the original file, rather than the generated JS file which is actually being executed. | ||
|Feature requirements=* When a sourcemap is available, error messages in console will link to the original source, not the generated JS | |Feature requirements=* When a sourcemap is available, error messages in console will link to the original source, not the generated JS | ||
* Likewise, console log output will link back to the original source | * Likewise, console log output will link back to the original source | ||
Line 35: | Line 35: | ||
* A specification for generated scripts to refer to their mappings and a mapping format | * A specification for generated scripts to refer to their mappings and a mapping format | ||
* SpiderMonkey needs to output column in addition to source/line. | * SpiderMonkey needs to output column in addition to source/line. | ||
* code that is loaded via eval() should also support sourcemaps | |||
|Feature non-goals=* Ideally, the source mapping file will also work for mapping LESS and similar to CSS. However, implementing the user interface for style source mapping is out of scope for this particular feature. | |Feature non-goals=* Ideally, the source mapping file will also work for mapping LESS and similar to CSS. However, implementing the user interface for style source mapping is out of scope for this particular feature. | ||
* It is possible to have a chain of source maps. Consider the case of a .coffee file that is compiled to .js and run through Closure Compiler. The final source map would refer to lines in the compiled JS, which would have a separate source map referring to lines in the .coffee file. For the first crack at this feature, we will not bother with that case. | * It is possible to have a chain of source maps. Consider the case of a .coffee file that is compiled to .js and run through Closure Compiler. The final source map would refer to lines in the compiled JS, which would have a separate source map referring to lines in the .coffee file. For the first crack at this feature, we will not bother with that case. | ||
* console.trace does not need to be supported in the initial version | |||
|Feature functional spec=I've written a web app called "Social Socialer Socialest". It's going to make me rich. I spent all morning creating it. | |Feature functional spec=I've written a web app called "Social Socialer Socialest". It's going to make me rich. I spent all morning creating it. | ||
Line 64: | Line 66: | ||
When an error is first generated, the source maps have not yet been loaded. That means that the Web Console cannot immediately display the mapped error info. Once an error is hit, however, the map should be loaded and the error message should be updated as soon as possible to contain the mapped info. | When an error is first generated, the source maps have not yet been loaded. That means that the Web Console cannot immediately display the mapped error info. Once an error is hit, however, the map should be loaded and the error message should be updated as soon as possible to contain the mapped info. | ||
|Feature ux design=[[File:SourceMapInConsole.png|Source mapped output in the Web Console]] | |Feature ux design=[[File:SourceMapInConsole.png|Source mapped output in the Web Console]] | ||
|Feature implementation notes= | |Feature implementation notes=* {{bug|771597}} - Source maps + debugger meta bug | ||
[https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit The source map file format specification] | |||
[https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit The source map file format | |||
}} | }} | ||
{{FeatureInfo | {{FeatureInfo | ||
|Feature priority= | |Feature priority=P3 | ||
|Feature rank=3 | |||
|Feature roadmap=Developer Tools | |Feature roadmap=Developer Tools | ||
|Feature list=Desktop | |Feature list=Desktop | ||
Line 98: | Line 78: | ||
}} | }} | ||
{{FeatureTeamStatus | {{FeatureTeamStatus | ||
|Feature security status=sec-review- | |Feature security status=sec-review-complete | ||
|Feature security notes= | |Feature security health=OK | ||
|Feature security notes=Complete: 2011.08.24 [[Security/Reviews/Firefox9/ReviewNotes/SourceMap|Notes]] | |||
}} | }} |