Open Bug 784112 Opened 12 years ago Updated 2 years ago

Debugger cannot distinguish multiple instances of the same file in different iframes

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: rcampbell, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The scripts dropdown in the debugger will display only one instance of a source file if it's included multiple times via different iframes. There's no way to debug a specific script / iframe context.
Bug 637572 may provide a nice way to fix this.
Priority: -- → P3
This seems to be the underlying cause of bug 863078 as well.
Blocks: 863078
Summary: Debugger does not have a means to distinguish multiple instances of the same file in different iframes → Debugger cannot distinguish multiple instances of the same file in different iframes
Attached file test case
I've attached a simple test case to make it easier to reproduce the issue. In that test case, script.js should be listed twice within the Sources panel, once for main.html and once for iframe.html. Sebastian
Product: Firefox → DevTools

Adding this to dbg-sources as I'm not sure we cover all of these cases.

Blocks: dbg-sources

Yeah we definitely don't handle this right now. Since the thread actor doesn't have a concept of nested frames, the list of sources is just per-thread, so the client will merge multiple source actors for a file into one source in the tree.

I think this all goes back to really deciding how we want to distinguish the overall tree of frames & assets. In a perfect world each source would be associated with a frame, and the debugger's left-hand tree would be a tree of frames, not just a list of sources-per-thread.

We may be able to implement this with the introductionScript and element fields on the Debugger.Source objects, but I don't know 100% for sure.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: