Bug 193148

Summary: Web Inspector: Add a Setting Toggle for Source Maps
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2019-01-04 11:04:09 PST
Add a Setting Toggle for Source Maps
Comment 1 Joseph Pecoraro 2019-01-04 11:06:38 PST
Created attachment 358338 [details]
[PATCH] Proposed Fix
Comment 2 Devin Rousso 2019-01-04 11:43:12 PST
Comment on attachment 358338 [details]
[PATCH] Proposed Fix

r=me, should we add a `console.assert(WI.settings.sourceMapsEnabled.value)` inside `WI.SourceMap` somewhere, for sanity's sake?  Do we want to do anything for the case where the user disables source maps after having already downloaded and shown them (e.g. in Resources)?
Comment 3 Simon Fraser (smfr) 2019-01-04 12:01:20 PST
If I'm a naive user debugging JS stuff on a web site, how do I know that I need to enable or disable source maps?
Comment 4 Joseph Pecoraro 2019-01-04 12:07:09 PST
(In reply to Devin Rousso from comment #2)
> Comment on attachment 358338 [details]
> [PATCH] Proposed Fix
> 
> r=me, should we add a `console.assert(WI.settings.sourceMapsEnabled.value)`
> inside `WI.SourceMap` somewhere, for sanity's sake?  Do we want to do
> anything for the case where the user disables source maps after having
> already downloaded and shown them (e.g. in Resources)?

We should eventually do something where when the user toggles source maps it goes and hides / shows source maps stuff, but for now a reload is sufficient.


(In reply to Simon Fraser (smfr) from comment #3)
> If I'm a naive user debugging JS stuff on a web site, how do I know that I
> need to enable or disable source maps?

JavaScript developers should be familiar with the concept of source maps. If they are debugging their own content they should know, if they are debugging random content then its just something unfamiliar they would have to come across. The Web Inspector UI indicates SourceMaps uniquely in a few ways, which may help them recognize it is different.
Comment 5 Joseph Pecoraro 2019-01-04 13:01:11 PST
> (In reply to Simon Fraser (smfr) from comment #3)
> > If I'm a naive user debugging JS stuff on a web site, how do I know that I
> > need to enable or disable source maps?
> 
> JavaScript developers should be familiar with the concept of source maps. If
> they are debugging their own content they should know, if they are debugging
> random content then its just something unfamiliar they would have to come
> across. The Web Inspector UI indicates SourceMaps uniquely in a few ways,
> which may help them recognize it is different.

In other words, learning about Source Maps is not much different than learning about some JS / CSS features you aren't familiar with.
Comment 6 WebKit Commit Bot 2019-01-04 13:27:41 PST
Comment on attachment 358338 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 358338

Committed r239635: <https://trac.webkit.org/changeset/239635>
Comment 7 WebKit Commit Bot 2019-01-04 13:27:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-01-04 13:28:53 PST
<rdar://problem/47055858>