Closed Bug 1273730 Opened 8 years ago Closed 8 years ago

"pretty print" button does not work in worker script debugger

Categories

(DevTools :: Debugger, defect, P1)

defect

Tracking

(firefox50 verified)

VERIFIED FIXED
Firefox 50
Tracking Status
firefox50 --- verified

People

(Reporter: bkelly, Assigned: jlong)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

STR:

1) Go to https://jakearchibald.github.io/svgomg/
2) Open about:debugging
3) Click debug for the svgomg service worker script
4) Click the "{ }" button to pretty print the minified source

Expected: prettified source

Actual: a green progress bar that never finishes
Actually, this seems to happen when trying to pretty print normal worker scripts as well.  Not just service workers.
Summary: "pretty print" button does not work in service worker script debugger → "pretty print" button does not work in worker script debugger
Possibly related to bug 1271954.

Eddy, I thought there already was a bug about pretty printing being broken for workers, but I couldn't find it. Please mark as duplicate if there actually was one.
Component: Developer Tools → Developer Tools: Debugger
Flags: needinfo?(ejpbruel)
Priority: -- → P1
I don't think we ever opened a bug for pretty printing in workers. Pretty printing requires source mapping, and the latter didn't even work in workers. Source mapping should work now, so it makes sense to open a bug for this now.

In any case, I couldn't find a duplicate for this either, so let's keep this bug as is.
Flags: needinfo?(ejpbruel)
Can we at least disable the button on workers then?  If you click this on a worker debugger you break that worker debugger display until the service worker is unregistered.
Flags: needinfo?(janx)
(In reply to Ben Kelly [:bkelly] from comment #4)
> Can we at least disable the button on workers then?  If you click this on a
> worker debugger you break that worker debugger display until the service
> worker is unregistered.

Agreed.
Flags: needinfo?(janx) → needinfo?(ejpbruel)
(In reply to Jan Keromnes [:janx] from comment #5)
> (In reply to Ben Kelly [:bkelly] from comment #4)
> > Can we at least disable the button on workers then?  If you click this on a
> > worker debugger you break that worker debugger display until the service
> > worker is unregistered.
> 
> Agreed.

That sounds good to me. James, would you be willing to look into this?
Flags: needinfo?(ejpbruel) → needinfo?(jlong)
Sure, I'll have a patch in a few minutes
Flags: needinfo?(jlong)
Assignee: nobody → jlong
Attached patch 1273730.patch (obsolete) — Splinter Review
Attachment #8765491 - Flags: review?(ejpbruel)
Comment on attachment 8765491 [details] [diff] [review]
1273730.patch

Review of attachment 8765491 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM

::: devtools/client/debugger/content/views/sources-view.js
@@ +109,5 @@
>  
>      this._noResultsFoundToolTip = new Tooltip(document);
>      this._noResultsFoundToolTip.defaultPosition = FUNCTION_SEARCH_POPUP_POSITION;
>  
> +    if (Prefs.prettyPrintEnabled && !isWorker) {

This needs a comment for why it is disabled if this is a worker. Could be as simple as pretty printing doesn't work in workers yet, so we've disabled this button for now.
Attachment #8765491 - Flags: review?(ejpbruel) → review+
Attached patch 1273730.patchSplinter Review
Added comment. try is down right now, will commit later today
Attachment #8765491 - Attachment is obsolete: true
Attachment #8766778 - Flags: review+
Pushed by jlong@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/2256463545d7
remove pretty-print button if debugging workers because it doesn't work r=ejpbruel
https://hg.mozilla.org/mozilla-central/rev/2256463545d7
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
See Also: → 1271954
I have reproduced this bug with Nightly 49.0a1 (2016-05-17) on Ubuntu 14.04, 64 bit!

The bug's fix is now verified on latest Aurora 50.0a2.

Aurora 50.0a2:
Build ID 	20160824004001
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

[bugday-20160824]
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: