standardizing Error.stack or equivalent

John Barton johnjbarton at google.com
Mon Mar 31 08:59:28 PDT 2014


My goal is more modest: to ensure that Loader/System function(s) that
accept strings defining JS allow name parameters.

We should also work out how to include source-maps. The loader has the
right position to obtain the sourcemap from the server or from transcoders.
If we have API on the loader to tell the debugger about the map we can have
a much more flexible solution.


On Mon, Mar 31, 2014 at 8:43 AM, John Lenz <concavelenz at gmail.com> wrote:

> John did you want to propose an alternative?  Maybe:
> A "name" parameter for inline scripts and eval?  This might work for
> "sourceUrl" but might be limiting for "soureMappingUrl".
>
>
>
> On Sun, Mar 30, 2014 at 6:25 PM, John Barton <johnjbarton at google.com>wrote:
>
>> 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
>>>
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140331/67952806/attachment.html>


More information about the es-discuss mailing list