Closed Bug 1361271 Opened 8 years ago Closed 2 years ago

pretty-print of file not available when sourceMappingURL comment exists

Categories

(DevTools :: Debugger, enhancement, P5)

55 Branch
enhancement

Tracking

(firefox108 fixed)

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: karlcow, Assigned: bomsy)

References

(Blocks 3 open bugs, )

Details

Attachments

(1 file)

For now you should be able to right click on the tab and choose Pretty Print Source.
Product: Firefox → DevTools
Summary: unminification of script not available → unminification of script not available when sourceMappingURL comment exists
Type: defect → enhancement
Priority: -- → P5
Summary: unminification of script not available when sourceMappingURL comment exists → pretty-print of file not available when sourceMappingURL comment exists

We want to

  • enable pretty printing when source mapped files are unavailable, even if there is a sourceMappingURL
  • potentially keep the option to prettify minified & sourcemapped files, but only in the context menu and with a warning

Reason for the second item is that combining pretty printing and sourcemaps might confuse the debugger.

The following check should probably also check if an original source is actually available:
https://searchfox.org/mozilla-central/rev/fa81b64fc1a339e2b2b1f6a8637a689916e13c4e/devtools/client/debugger/src/selectors/sources.js#194

    (prefs.clientSourceMapsEnabled && isSourceWithMap(state, id))

If it isn't available, we would consider that sourcemap isn't available for this minified file and allow to pretty print.

Severity: normal → S3
Assignee: nobody → hmanilla
Attachment #9298169 - Attachment description: Bug 1361271 - [devtools] Show pretty-print icon for minified files with sourceMappingURL [WIP] → Bug 1361271 - [devtools] Fix pretty-printing on sourcemapped sources r=ochameau
Status: NEW → ASSIGNED
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a40d18af9277 [devtools] Fix pretty-printing on sourcemapped sources r=ochameau,flod
Regressions: 1798519
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: