Set the devtools chrome debugging prefs to true by default in mochitests

RESOLVED FIXED in Firefox 67

Status

enhancement
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: bgrins, Assigned: bgrins)

Tracking

(Blocks 1 bug)

Version 3
mozilla67
Points:
---

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 months ago

When I run a mochitest (without the --jsdebugger arg), I sometimes still want to open the Browser Toolbox after the fact.

This requires jumping through hoops, because the following prefs are false by default:
https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713

So I need to manually go through steps to open it: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox#Enabling_the_Browser_Toolbox. Then I run out of time and the mochitest times out before I get very far.

Some workarounds available:

  1. set up an [alias] in machrc like:
mochitest = mochitest --setpref devtools.chrome.enabled=true --setpref devtools.debugger.remote-enabled=true --setpref devtools.debugger.prompt-connection=false
  1. Always run mochitest with --jsdebugger or with the above --setpref calls

But I assume this might be a common pain point, and suggest we should either:

  1. remove the overrides in https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/perf/user.js#44-45. We already do this for local builds at https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/devtools/shared/preferences/devtools-shared.js#27)
  2. Unconditionally set them to true for mochitest only at https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/mochitest/mochitest_options.py#708-713.

Only mochitest and wpt use that unittest-required profile, and normally wpt just wants to run with the exact same set of prefs that mochitest does. So I'd prefer if we could remove the override from there. I can see a case for leaving it disabled in the perf profile though (which mochitest doesn't use anyway).

James, can you think of any reason not to remove these lines for wpt (assuming everything still passes)?
https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/testing/profiles/unittest-required/user.js#91-93

Flags: needinfo?(james)
(Assignee)

Updated

3 months ago
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #9039174 - Attachment description: Bug 1522921 - Set the devtools chrome debugging prefs to true by default in mochitests → Bug 1522921 - Set the devtools chrome debugging prefs to true by default in mochitests and wpt

No, removing that seems fine. Ideally I'd like the wpt tests to have the same support for starting the debugger that mochitets have.

Flags: needinfo?(james)
(Assignee)

Updated

3 months ago
See Also: → 1522916

Comment 4

3 months ago
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5ea2f61028a5
Set the devtools chrome debugging prefs to true by default in mochitests and wpt r=ahal,miker

Comment 5

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.