Open Bug 1446127 Opened 7 years ago Updated 2 years ago

Show debugger sourcemaps in the browser toolbox

Categories

(DevTools :: Debugger, task, P5)

task

Tracking

(firefox60 fix-optional, firefox61 fix-optional)

Tracking Status
firefox60 --- fix-optional
firefox61 --- fix-optional

People

(Reporter: jlast, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

It would be great if we had sourcemaps for the debugger bundle in the browser toolbox. This would help in two ways: 1. it would help us debug issues with the debugger 2. it would be a large app that uses sourcemaps and make it easier for us to see how we're doing from a product quality perspective https://shipusercontent.com/4f4fd63c681eb2a656e77c01bf85acb1/Screen%20Shot%202018-03-15%20at%201.55.01%20PM.png
bgrins helped me sort out the jar.mn concerns so that we could have sourcemaps for the debugger bundles which is pretty cool. While we’re checking in large maps, they won’t land in a release
Comment on attachment 8959295 [details] Bug 1446127 - Show debugger sourcemaps in the browser toolbox. https://reviewboard.mozilla.org/r/228156/#review234006 ::: devtools/client/jar.mn:34 (Diff revision 2) > content/sourceeditor/codemirror/lib/codemirror.css (sourceeditor/codemirror/lib/codemirror.css) > content/sourceeditor/codemirror/mozilla.css (sourceeditor/codemirror/mozilla.css) > content/sourceeditor/codemirror/cmiframe.html (sourceeditor/codemirror/cmiframe.html) > content/sourceeditor/codemirror/old-debugger.css (sourceeditor/codemirror/old-debugger.css) > content/debugger/new/index.html (debugger/new/index.html) > + #ifndef MOZILLA_OFFICIAL This should be aligned all the way to the left of the file (like https://searchfox.org/mozilla-central/source/browser/base/jar.mn#56), otherwise I believe it will be treated as a comment
Comment on attachment 8959295 [details] Bug 1446127 - Show debugger sourcemaps in the browser toolbox. https://reviewboard.mozilla.org/r/228156/#review233996 Interesting idea, sounds useful! :) From our chat, it sounds like there are some encoding options we should explore first to trim the maps in several ways. Is it possible to tweak the mapping process to avoid user-specific paths like `webpack:////Users/jlaster/src/mozilla`? Even if they still work fine for other people, I think it would be preferable to avoid them if we can. ::: devtools/client/debugger/new/debugger.css.map:1 (Diff revision 1) > +{"version":3,"sources":[],"names":[],"mappings":"","file":"debugger.css","sourceRoot":""} Does this file actually do something...? It looks like an empty map. Maybe we don't need a map for this? ::: devtools/client/debugger/new/debugger.js:1450 (Diff revision 1) > } > > // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args > // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine > // whether mapToProps needs to be invoked when props have changed. > -// > +// For historical purposes, I think we would best to revert the line ending changes here (from your editor...?), so that the only change is the mapping line at the end. ::: devtools/client/jar.mn:34 (Diff revision 1) > content/sourceeditor/codemirror/lib/codemirror.css (sourceeditor/codemirror/lib/codemirror.css) > content/sourceeditor/codemirror/mozilla.css (sourceeditor/codemirror/mozilla.css) > content/sourceeditor/codemirror/cmiframe.html (sourceeditor/codemirror/cmiframe.html) > content/sourceeditor/codemirror/old-debugger.css (sourceeditor/codemirror/old-debugger.css) > content/debugger/new/index.html (debugger/new/index.html) > + #ifndef MOZILLA_OFFICIAL Does it make sense to use `DEBUG_JS_MODULES` instead here? I am not sure myself... If you did change to that, that would mean that these source maps are tied to React dev builds (since that's what also uses this flag), and perhaps you want to be able to use these maps independently of that mode? Anyway, let's use C macro style here, which means the `#` lines should get no indentation. The actual mapping lines you added should be on the same column as any other mapping. Here is a style example: https://searchfox.org/mozilla-central/source/toolkit/content/jar.mn#13
Attachment #8959295 - Flags: review?(jryans) → review-
Thanks jryans 1. I've got a patch that strips the user-specific paths. I'll update it shortly 2. i think we should include the empty css map and then populate it later, it is easier to do that way than exclude it now 3. i prefer mozilla_official as i think it should be the default when you build/run. You can always jump to view the bundle 4. i'll clean up the diff and indentation.
Product: Firefox → DevTools
Blocks: node-dx
Type: enhancement → task
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: