Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Issue 7045003: Support extracting source mapping url defined by //@ sourceMappingURL=<url> comment. (Closed)

Created:
9 years, 7 months ago by podivilov
Modified:
8 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Support extracting source mapping url defined by //@ sourceMappingURL=<url> comment.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -8 lines) Patch
M src/messages.js View 2 chunks +25 lines, -6 lines 0 comments Download
M src/mirror-debugger.js View 1 chunk +5 lines, -0 lines 0 comments Download
M test/mjsunit/debug-compile-event.js View 2 chunks +9 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
podivilov
9 years, 7 months ago (2011-05-18 13:21:17 UTC) #1
mnaganov (inactive)
On 2011/05/18 13:21:17, podivilov wrote: Can you please elaborate more on explaining why this is ...
9 years, 7 months ago (2011-05-18 13:49:08 UTC) #2
podivilov
On 2011/05/18 13:49:08, Mikhail Naganov (Chromium) wrote: > On 2011/05/18 13:21:17, podivilov wrote: > > ...
9 years, 7 months ago (2011-05-18 14:08:23 UTC) #3
mnaganov (inactive)
9 years, 7 months ago (2011-05-19 06:32:08 UTC) #4
I think, this change is premature.

Does any of JS compilers actually emit such a comment? No.

And I'm sceptic that any of JS compilers will ever support emitting such URLs
because application compilation and deployment are logically separate steps, and
the compiler might not know, how the URL will look like. Using relative URLs
might help, but that looks lame.

To me, a better approach would be to mimic the behavior of debugging symbols
loading for native applications. That is, user specifies a directory (or a base
URL) for mappings, and in that dir, for each JS file a corresponding mapping
file can be found, named in some predictable manner. This requires no support
from a VM engine, all symbol handling can be implemented in a debugger.

On 2011/05/18 14:08:23, podivilov wrote:
> On 2011/05/18 13:49:08, Mikhail Naganov (Chromium) wrote:
> > On 2011/05/18 13:21:17, podivilov wrote:
> > 
> > Can you please elaborate more on explaining why this is needed, and how this
> can
> > be used?
> 
> When debugging compiled script in chrome dev tools, user will have an option
to
> specify source mapping location and to debug sources rather then compiled
code.
> Also, compiler may emit //@ sourceMappingURL=<url> comment in compiled script.
> In that case we will pick up the mapping automatically.
> 
> Please see chrome feature request
> http://code.google.com/p/chromium/issues/detail?id=26912.

Powered by Google App Engine
This is Rietveld 408576698