Closed Bug 1766128 Opened 4 months ago Closed 1 month ago

JS pauses on 'debugger;' when the browser console is open, even if there is no debugger

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(firefox104 verified)

VERIFIED FIXED
104 Branch
Tracking Status
firefox104 --- verified

People

(Reporter: Oriol, Assigned: nchevobbe)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

  1. Open browser console
  2. Back in the Firefox window, load this URL in a new tab: data:text/html,<script>debugger;document.write("OK")</script>

Expected: you see a page with OK
Actual: blank page, the loading indicator still going on

Regression window: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e375b85cfba38ff5f49493d1d48b7561f7f2f8d7&tochange=432e42cbbc4139efd2319952ec33efe8ff9add3c

Seems a potential explanation of bug 1669171, then the culprit would be bug 1657310.

Bomsy, can you add the relevant meta for browser toolbox and breakpoints

Severity: -- → S3
Flags: needinfo?(hmanilla)
Priority: -- → P2
Flags: needinfo?(hmanilla)
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED

stealing this as discussed with bomsy on Slack :)

Assignee: hmanilla → nchevobbe

This patch is sending the doNotAttachThreadActor property we already set on
some descriptor front to the getWatcher method, where we then put it on the
session context.
Then in ThreadActor#attach, if doNotAttachThreadActor is true, we simply
bail out.
A test is added to check that having a script with a debugger statement does
not lead to the thread pausing.

Attachment #9283012 - Attachment description: Bug 1766128 - [devtools] Don't attach thread actor in Browser Console. r=ochameau. → Bug 1766128 - [devtools] Don't define empty default values for sessionData in getSessionData. r=ochameau
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c036b48c5be1
[devtools] Don't define empty default values for sessionData in getSessionData. r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Flags: qe-verify+

Reproduced with Firefox 101.0a1 (20220423212733) on Windows 10x64 using STR from comment 0. The page is no loaded after opening the browser console.
The issue is verified fixed with Firefox 104.0b4 (20220731190208) on Windows 10x64, macOS 11 and Ubuntu 20.04. The page is successfully loaded while the browser console is opened.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.