Closed Bug 1522921 Opened 5 years ago Closed 5 years ago

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

Categories

(Testing :: Mochitest, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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: 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)
See Also: → 1522916
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
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: