Closed Bug 976017 Opened 11 years ago Closed 11 years ago

Firebug confused when breakpoints set in frames

Categories

(DevTools :: Debugger, defect)

27 Branch
x86_64
Windows 7
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 784112

People

(Reporter: tlhackque, Unassigned)

Details

(Whiteboard: [bugday-20140303])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release) Build ID: 20140212131424 Steps to reproduce: I have a document containing several <iframe> elements. The document, and each iframe loads a common .js file in addition to jQuery. In the init file is a $(window).load( { ...}) function, in which I set a breakpoint. So the setup looks like: Top Doc: <head> <script src="jQuery.js"></script> <script src="init.js"></script> </head><body> <iframe src="child?param=1"> <iframe src="child?param=2"> ... </body> Child Doc: <head> <script src="jQuery.js"></script> <script src="init.js"></script> </head><body> xxx </body> init.js: $(window).load( function () { alert("loaded"); // Set a breakpoint here (or try to) }); Obviously, this is simplified. The real init script looks for HTML constructs that may appear in any frame & initializes them. There can be dozens of iframes. Actual results: init.js is only loaded across the network once (good), and appears in the Script panel of Firebug only once (may be bad). Without any breakpoints, the alert goes off for the main window and each iframe. (good) If I set a breakpoint on the indicated line, it's not hit for all frames. (bad) The results don't seem to be deterministic. (worse) This turns simple debugging into a nightmare. Firebug is almost (not quite) useless in this environment. Expected results: Minimally I expected the breakpoint to be set and reached in EVERY frame that loaded the file. E.G. 3 times in the schematic above. Top frame + 2 child frames. Alternatively (and sometimes, but not always prefered), I hoped to be able to set the breakpoint in a specific frame (without resorting to writing code in a conditional breakpoint expression). So I sort of expected init.js to show up in the script panel's list of scripts once for each frame. Then I could load the page, select the instance(s) I want to debug, refresh the page and get deterministic results.
Severity: normal → critical
Could be related to bug 958752?
Whiteboard: [bugday-20140303]
Component: Untriaged → Developer Tools: Debugger
Assuming 'Firebug' in comment 0 means 'Firefox Debugger', this is bug 784112. We're currently blocked on full Debugger.Source API support in the debugger backend.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.