Closed Bug 1258830 Opened 8 years ago Closed 5 years ago

Debugger can't pretty-print script used several times on the page

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox48 affected)

RESOLVED WORKSFORME
Tracking Status
firefox48 --- affected

People

(Reporter: arni2033, Unassigned)

References

Details

User Story

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509

STR_1:
1. Open url [1] or https://russian.rt.com/article/141671 in a new tab
2. Open debugger, select script "showad.js", click button to prettify script.

STR_2:
1. Open url [2] in a new tab (script from my dropbox)
2. Open debugger, click button to prettify script.

> [1] data:text/html,<script src="https://ads.pubmatic.com/AdServer/js/showad.js"></script><iframe src="https://ads.pubmatic.com/AdServer/js/showad.js"></iframe>
> [2] data:text/html,<script src="https://dl.dropboxusercontent.com/s/vfyqkyxwtbvo5c3/script 2 - showad.js"></script><iframe src="https://dl.dropboxusercontent.com/s/vfyqkyxwtbvo5c3/script 2 - showad.js"></iframe>


AR:  The script isn't prettified
ER:  Pretty-print should not be broken.

Note: The same script can be pretty-printed in Scratchpad and even in debugger, if I remove <iframe>
____

Attachments

(1 file, 1 obsolete file)

I attached the JS-file (just in case)
Oh great, another pretty printing corner case :-(

This should be fixed soon, but we have a lot on our plate right now, and pretty printing is not our top priority. Assigning P2 to this.
Priority: -- → P2
Attachment #8733541 - Attachment mime type: application/x-javascript → text/html
Attachment #8767284 - Attachment mime type: text/html → text/javascript
Attachment #8733541 - Attachment is obsolete: true
Comment on attachment 8767284 [details]
script 2 - showad.js

Okay. Sorry for bug spam, but it appeared that I made a mistake while saving+attaching JS-file.

I attached the actual file "script 2", but it's not possible reproduce this bug using "data:" url with attached script (in the same manner as "data:" url in comment 0). That's because to reproduce this, you need a script which has Content-Type:"text/html" and url that ends with ".js", otherwise you'll run into bug 1224654. I'll try to create testcase once again, and update this bug if I succeed
Attachment #8767284 - Attachment mime type: text/javascript → text/html
User Story: (updated)
User Story: (updated)
See Also: → 1224981, 1224654, 1249022
Product: Firefox → DevTools

I tested this using:
http://janodvarko.cz/tests/bugzilla/1258830/

STR

  1. Load the page
  2. Pretty print script.js

script.js is loaded as text/html and pretty printing (as well as breaking in it) works fine.

Closing

Honza

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: