Closed Bug 1289570 Opened 8 years ago Closed 7 years ago

Pref on source maps in the web console

Categories

(DevTools :: Console, enhancement, P2)

46 Branch
enhancement

Tracking

(relnote-firefox -)

RESOLVED FIXED
Tracking Status
relnote-firefox --- -

People

(Reporter: bgrins, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed)

Let's figure out what sort of perf measurements we need to hit to turn on source maps in the web console by default ("devtools.sourcemap.locations.enabled").
We also have an option to enable it in Nightly builds but not Dev Edition
Just a question for discussion, but what steps do we need to take before we are able to enable to source maps by default.
By my understanding we need to fix any bugs that might come up, and write more tests to make sure it doesn't break, in the future.
We have fixed all the bugs I have seen so far, and also added some optimizations which Jordan suggested. 
There might be some performance impact for enabling source maps, but it might be worth enabling it anyway, because of the utility of the feature.
Personally, I am interested in enabling it only in Nightly builds for the time being, to test it out more thoroughly in the developer community more easily.
Flags: needinfo?(jsantell)
Flags: needinfo?(bgrinstead)
I think flipping it on in nightly would be a good way to shake out some bugs -- I'd be weary of it in dev edition without more tests and some time to hit any issues with real world source maps in nightly, because if it breaks, users won't know it has to do with source maps if it's on by default (and then they don't have a working console). Up to ya'll actually working on the console :)
Flags: needinfo?(jsantell)
I agree with Jordan - let's flip this on in Nightly:

// Enable the experimental support for source maps in console (work in progress)
#if defined(NIGHTLY_BUILD)
pref("devtools.sourcemap.locations.enabled", true);
#else
pref("devtools.sourcemap.locations.enabled", false);
#endif
Flags: needinfo?(bgrinstead)
Release Note Request (optional, but appreciated)
[Why is this notable]: Allows web developers to get to the original source's line from the web console.
[Suggested wording]: Source maps support in web console
[Links (documentation, blog post, etc)]: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages#Source_maps
relnote-firefox: --- → ?
Priority: -- → P2
Thanks a lot for bringing this feature to Firefox! :)

But unfortunately I cannot make it work. I'm using Firefox 50 and enabled 'devtools.sourcemap.locations.enabled' in 'about:config'. I restarted Firefox and opened a Ember app. When I get an error I just see a backtrace in the 'Call Stack' tab of the error with lines like this:

> .send http://localhost/assets/vendor.js:19333:6
> .ajax http://localhost/assets/vendor.js:18814:5
> makeRequest http://localhost/assets/vendor.js:124613:14
> authenticate/< http://localhost/assets/vendor.js:124532:9
> initializePromise http://localhost/assets/vendor.js:70977:7

Some other errors don't show the tabbed error but just a backtrace directly. I do have a 'http://localhost/assets/vendor.map'. 

When I click on the links in any of those cases a new tab opens with a "source:" URL of the file.

To contrast that, chromium shows the following stack trace:

> send			@	jquery.js:9175
> ajax			@	jquery.js:8656
> makeRequest	@	oauth2-password-grant.js:245
> (anonymous)	@	oauth2-password-grant.js:164
> initializePromise	@	ember.debug.js:51004

Is there anything else that I should do?

Thanks a lot!
(In reply to Cesar Izurieta from comment #7)
> Thanks a lot for bringing this feature to Firefox! :)
> 
> Is there anything else that I should do?
> 
> Thanks a lot!

I have filed a separate bug for you in Bug 1317962 for this issue.
(In reply to Jaideep Bhoosreddy [:jbhoosreddy] from comment #8)
> (In reply to Cesar Izurieta from comment #7)
> > Thanks a lot for bringing this feature to Firefox! :)
> > 
> > Is there anything else that I should do?
> > 
> > Thanks a lot!
> 
> I have filed a separate bug for you in Bug 1317962 for this issue.

Have had similar issue with MeteorJS app. Could it be related?
This was fixed by bug 1359144 - client-side source maps are enabled by default in devtools.js.
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 1359144
Resolution: --- → FIXED
The documentation at https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages#Source_maps needs to be updated accordingly.

Sebastian
Keywords: dev-doc-needed
Feels like this doesn't need to be in the main firefox release notes since it's a developer feature, and the description on MDN should work fine for that audience.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.