Closed Bug 1578755 Opened 2 months ago Closed Last month

Debugger doesn't tell which copy is prettified

Categories

(DevTools :: Debugger, defect, P3)

70 Branch
defect

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: minkul.alam, Assigned: zhaogangse)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

In debugger tab prettify a minified source

Actual results:

Firefox doesn't show which copy is formatted.

Expected results:

Firefox should show which tab contains prettified version.

This may be one for UX review but the "{}" is the pretty print icon -- you would have clicked a button with that icon to create the pretty version.

Chrome shows which tab contains formatted version after clicking {} (prettifier).

Blocks: dbg-frontend
Keywords: good-first-bug
Priority: -- → P3

Hi!

I may have misunderstood the problem, but this doesn't seem like a bug.

The {} by the left side of the script file name indicates that it's formatted, as David already stated :). When the {} is missing, that's minified.

(In reply to nico from comment #3)

Hi!

I may have misunderstood the problem, but this doesn't seem like a bug.

The {} by the left side of the script file name indicates that it's formatted, as David already stated :). When the {} is missing, that's minified.

The buggy part is that, after we got the prettified file, if we switch back to the original("generated" is the jargon) ugly tab and click the '{}' again, it will not navigate to the prettified tab, which is not expected: clicking '{}' should ALWAYS jump to the prettified tab.

I can confirm what I just described IS a bug because I saw JavaScript error being thrown along the steps ...

There is some difference between what I and Minkul described, but they are quite similar. It's a bug at the end of the day :)

In previous code, the selectedLocation can be a non-empty object containing a line number of 0, which will cause the sourceMap to complain and halt the jumping procedure. I added a check to make sure that the sourceMap branch is only executed when the selectedLocation makes sense.

Attachment #9099123 - Attachment description: Bug 1578755 - Fix a guarding condition for jumping to prettified tab correctly. r=jlast → Bug 1578755 - Fix a guarding condition for jumping to prettified tab correctly.r=jlast
Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b081f194477
Fix a guarding condition for jumping to prettified tab correctly.r=davidwalsh
Status: UNCONFIRMED → RESOLVED
Closed: Last month
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Assignee: nobody → zhaogangse
You need to log in before you can comment on or make changes to this bug.