Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#9374 closed enhancement (fixed)

enable '//@ sourceURL' debug assist for WebKit

Reported by: pmuellr Owned by: Adam Peller
Priority: high Milestone: 1.4
Component: Core Version: 1.3.1
Keywords: Cc: Adam Peller, James Burke, dante
Blocked By: Blocking:


In dojo._base._loader.loader.js, in the dojo._loadUri() function, a comment of the form "@ sourceURL" is appended to source about to be eval()'d, as a debug assist for Firebug.

I've submitted code to WebKit? to enable the same functionality there:

Unfortunately, dojo only enables this check if the browser is a Mozilla-based browser (a check if(d.isMoz) is made). I'd like to either have the check removed, or extended to include WebKit?.

I've tested removing the check, and with the WebKit? patch, everything works fine, and you get "named" eval(0's.

Change History (6)

comment:1 Changed 13 years ago by James Burke

Cc: Adam Peller added
Component: GeneralCore
Milestone: tbd1.4

Cool! I thought there was a problem with IE if we just removed that check (will have to check with peller), but we should get this in for 1.4.

comment:2 Changed 13 years ago by Adam Peller

Owner: changed from anonymous to Adam Peller

comment:3 Changed 13 years ago by alex

I'd really like a way to test to see if this will be useful before we pay the string concatenation cost. Maybe test for a "good enough" console object?

comment:4 Changed 13 years ago by Adam Peller

Cc: James Burke dante added

I don't think it's future proof to even test against console, and I don't know of any other test, unless we want to switch on isDebug. Even without debugging support for this notation, like in IE, it's sometimes helpful to have this path information visible in the file to help identify the buffer.

I'd take out the browser check entirely if I understood why I could no longer reproduce #5901. Even IE6 doesn't seem to mind when I take out the if(d.isMoz). Maybe this has something to do with the developer using cc_on? Did we used to have that in our code or something?

comment:5 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [17796]) Inject "@ sourceURL" debugging hints for all browsers, except IE, where it might conflict with conditional compilation. Fixes #9374.

comment:6 Changed 12 years ago by pmuellr

For the curious, Safari 4.0.3 now ships the sourceURL hint support for Web Inspector (first release to do so, AFAIK). Current builds of Chromium, do not seem to be shipping the support.

Note: See TracTickets for help on using tickets.