standardizing Error.stack or equivalent

John Barton johnjbarton at google.com
Sun Mar 30 18:25:05 PDT 2014


Hi Mark.  I implemented the first sourceURL support, for Firebug back in
the day. It's a kludge we worked out because there was no alternative. It
forces debuggers seek the ends of buffers even if they are millions of
bytes and even if the the name does not turn out to be the one the dev was
interested in. It forces developers to use a whacky naming 'API' involving
funky characters and special strings.

//# sourceURL woulds well in Firebug, Chrome Devtools, and IE as far as I
know.  It fails in Chrome devtools in two cases, for early compiles before
devtools is opened (known limitation) and when using the relatively new
devtools workspaces in some complicated cases. Otherwise you should report
bugs if it fails for you.

When new API arrives we don't have to miss the opportunity to do better.

Your references also include source-map discussion which uses same kludgy
API. Based on my experience, I think the low reliability of source-maps is
partly due to difficulty in testing and reporting bugs with the generated
maps. I thought the maps I created for traceur were fine, but later I
discovered that the ends of ASTs were not handled correctly but all the
user can observe is "the sourcemap gives wacky results, sometimes".

jjb


On Fri, Mar 28, 2014 at 11:55 AM, Sebastian Zartner <
sebastianzartner at gmail.com> wrote:

> Hi John, supposedly <
>> https://developers.google.com/chrome-developer-tools/docs/javascript-debugging#breakpoints-dynamic-javascript>
>> and <
>> http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl>
>> document the emerging de facto std for providing this name to the existing
>> API. However, I have not seen it work on any browser. See point #5 at <
>> https://mail.mozilla.org/pipermail/es-discuss/2014-March/036642.html>.
>> Am I doing something wrong here that account for my not seeing this, or
>> does it in fact not work anywhere?
>>
>
> sourceURL and displayName are also working in Firefox. Not consistently
> yet, though. FWIW Firebug is making use of these in it's 2.0 alpha 1
> version. See
> http://www.softwareishard.com/blog/firebug/firebug-2-support-for-dynamic-scripts/
> .
> Would be great if these could be standardized.
>
> Sebastian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140330/b2eb15a1/attachment.html>


More information about the es-discuss mailing list