Browser source maps
gijskruitbosch at gmail.com
Tue Oct 8 21:18:30 UTC 2013
On 08/10/13 23:04 , Fitzgerald, Nick wrote:
> On 10/8/13 8:53 AM, Gregory Szorc wrote:
>> I was talking to dcamp about source maps for chrome JS for bug 903149
>> and apparently something currently loads source maps using synchronous
>> I/O. So remote hosted source maps [with high latency] will probably
>> result in a bad time. Supposedly there is a bug somewhere for the
>> components to grow the appropriate async APIs.
> We definitely load source maps async in the debugger, which is the only
> tool that supports them at this time.
> If dcamp is talking about what I think he is, then he is talking
> specifically about console logging (which we don't source map ATM) and
> how you don't want to wait to fetch some source map before you print out
> console messages.
We could totally load the source map lazily though, and print the
console messages immediately but update the browser console when the
source map has come in. If we wanted to, we could also make the stderr
output print sequential IDs to console.error output, and log source
mapped output with the same ID - or even write a tinderbox output parser
which converted the preprocessed stacks to real source stacks. Somewhat
kludgy, but it'd work and you wouldn't have the syncness problem. OTOH,
for local builds, the maps could be available locally and maybe you'd
want stderr output to Just Work...
More information about the firefox-dev