Open Bug 1728287 Opened 3 years ago Updated 11 months ago

No longer stopping on `debugger;` in loops after closing and reopening Toolbox

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

Attachments

(1 file)

Attached file test_page.html

STRs:

  • open the test page in attachement
  • open the toolbox
  • (the debugger should break on a debugger statement quickly)
  • while paused, close the toolbox
  • reopen the toolbox

It seems the debugger is now in an odd state.
The setTimeout which contains the debugger; is still "blocked" but you can use other buttons in the page and they still work, trigger associated event handlers etc...

Spotted this while investigating Bug 1728096

See Also: → 1728096
See Also: → 1728290
Flags: needinfo?(hmanilla)

This relates to bug 717749 and _parentClosed:
https://searchfox.org/mozilla-central/rev/fe8b30e982c86d26ccf1f14d825c0de870b91f27/devtools/server/actors/thread.js#974

    // If the parent actor has been closed, terminate the debuggee script
    // instead of continuing. Executing JS after the content window is gone is
    // a bad idea.
    return this._parentClosed ? null : undefined;

_parentClosed used to be set to true only when the tab was closed, now it is rather set when DevTools are closed which can happen when the tab is closed... but also when the user closes them.
I'm not sure, with the new architecture we could easily convey such boolean to know when it relates to a tab close.

Flags: needinfo?(hmanilla)

It seems like, as this is in the generic pauseAndRespond... we may be preventing any resume on devtools closing :/
This doesn't seem to be specific to debugger statements/setInterval but a quite common issue.

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

Attachment

General

Created:
Updated:
Size: