The default bug view has changed. See this FAQ.

resume button need two clicks to go on after a breakpoint when the script is inside the .html file

VERIFIED FIXED in Firefox 16

Status

()

Firefox
Developer Tools: Debugger
P2
normal
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: fredy, Assigned: past)

Tracking

15 Branch
Firefox 16
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [testday-20120706])

Attachments

(2 attachments, 2 obsolete attachments)

Created attachment 639612 [details]
Test page

tested with latest Aurora (Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120705 Firefox/15.0a2) and latest nightly (Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/16.0 Firefox/16.0)

Steps to reproduce:

1. Open the attached file
2. Open the debugger
3. Set a breakpoint on the 10th line (document.getElementById("demo").innerHTML=x;)
4. Click Run
5. The execution stops at the breakpoint
6. Click resume button once

What happens:

Nothing happens, except that it seems to reload something at the "Global Scope [Window]".

Note that if you click one more time at the resume button the execution goes on normally.

What should happen:

It should have the same behavior as when the script is in an external file. So it should go on after the breakpoint with only one click.

Note that the same behavior exists on step in/over/out.
This was introduced with the patch for bug 737808. We add stored breakpoints for new scripts, without making sure that the lines in the stored breakpoints exist in those scripts.
Assignee: nobody → past
Status: NEW → ASSIGNED
Priority: -- → P2
Created attachment 640213 [details] [diff] [review]
Working patch

The two-line fix and a test. Nice catch fredy!
Attachment #640213 - Flags: review?(rcampbell)
Comment on attachment 640213 [details] [diff] [review]
Working patch

I've noticed this bug!

r+ with a try run!
Attachment #640213 - Flags: review?(rcampbell) → review+
Try run: https://tbpl.mozilla.org/?tree=Try&rev=dcd2eb6ec16c
Created attachment 641546 [details] [diff] [review]
Working patch v2

The test produced a couple of oranges, so I simplified it a bit to avoid them. New try: https://tbpl.mozilla.org/?tree=Try&rev=5e5915c9afa6
Attachment #640213 - Attachment is obsolete: true
Created attachment 641581 [details] [diff] [review]
Working patch v3

OK, so I got oranges again. Sue me. But this time I found a way to test the fix without depending on the test page being updated at all. Final try (famous last words): https://tbpl.mozilla.org/?tree=Try&rev=6ada79c9b665
Attachment #641546 - Attachment is obsolete: true
I told ya it would work!
https://hg.mozilla.org/integration/fx-team/rev/15727d21b0d9
Whiteboard: [testday-20120706] → [testday-20120706][fixed-in-fx-team]
The test added in the landing above, leaked on it's first run:

TEST-UNEXPECTED-FAIL | browser/devtools/debugger/test/browser_dbg_breakpoint-new-script.js | leaked 2 window(s) until shutdown [url = http://example.com/browser/browser/devtools/debugger/test/browser_dbg_breakpoint-new-script.html]
Depends on: 773653
https://hg.mozilla.org/mozilla-central/rev/15727d21b0d9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [testday-20120706][fixed-in-fx-team] → [testday-20120706]
Target Milestone: --- → Firefox 16
Verified fixed on the latest Aurora and Nightly

Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.