Make `--headless --jsdebugger` launch a Browser Toolbox that is not itself headless
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox84 fixed)
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(2 files)
Right now, the MOZ_HEADLESS
environment variable is set by the --headless
process and inherited by the launched Browser Toolbox process, hiding the debugger UI. This ticket tracks allowing to see the JS debugger when running under --headless
by explicitly removing the MOZ_HEADLESS
variable from the environment.
To do this, a small tweak to Subprocess.jsm
is needed to allow removing environment variables. Using null
to signal "removal", distinct from undefined
for "ignored", seems to be an accepted idiom in these types of JS interfaces, so I'll post a patch that starts with that approach.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This small tweak makes it ergonomic to remove variables from the
inherited environment. Using null
to signal "removal", distinct
from undefined
for "ignored", seems to be an accepted idiom in these
types of JS interfaces.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Before this commit, the MOZ_HEADLESS
environment variable was set by
the --headless
process and inherited by the launched Browser Toolbox
process, hiding the debugger UI. This commit allows to launch the JS
debugger when running under --headless
by explicitly removing the
MOZ_HEADLESS
variable from the environment. To do this, a small
tweak to Subprocess.jsm
is used that allows null
to signal
"removal", distinct from undefined
for "ignored".
While here I prefixed the output from the launched Browser Toolbox
process, which helps visually distinguish warnings, etc; and I also
corrected a typo that I stumbled across.
Depends on D95896
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/edb1f046f3f5 Pre: Make `VALUE: null` remove env vars in Subprocess.jsm. r=kmag https://hg.mozilla.org/integration/autoland/rev/19ed765b7623 Make `--headless --jsdebugger` launch a headed Browser Toolbox. r=emalysz
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/edb1f046f3f5
https://hg.mozilla.org/mozilla-central/rev/19ed765b7623
Description
•