Closed
Bug 1454000
Opened 6 years ago
Closed 6 years ago
Add documentation for DevTools flags and their logging behavior
Categories
(DevTools :: Framework, enhancement)
Tracking
(firefox61 fixed)
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: gregtatum, Assigned: gregtatum)
Details
Attachments
(1 file)
Right now it is a bit mysterious as to why devtools/shared/flags.js exists, and how to use it.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → gtatum
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8967770 [details] Bug 1454000 - Add documentation for DevTools flags and their logging behavior; https://reviewboard.mozilla.org/r/236474/#review242250 Thanks for adding these! Hopefully less mysterious for the next person... ::: devtools/shared/flags.js:19 (Diff revision 1) > +/** > * Create a writable property by tracking it with a private variable. > * We cannot make a normal property writeable on `exports` because > * the module system freezes it. > */ > function makeWritableFlag(exports, name, pref) { I guess with Alex's recent changes to make this based on a pref, it's not really "writable" anymore. It's now a read only value that is adjustable via a pref. The flags are a convenience to save us from littering the code base with the same pref name (if we were to just read a pref directly, for example). So, we may want to change these comments to avoid suggesting you can modify the flag directly. (Also, if you wish to rename `makeWritableFlag`, feel free...) ::: devtools/shared/flags.js:46 (Diff revision 1) > } > }); > } > > +/** > + * Setting `flags.wantLogging = true` will enable logging of the RDB calls Nit: RDP ::: devtools/shared/flags.js:61 (Diff revision 1) > + * toggle this behavior as well. > + */ > makeWritableFlag(exports, "wantVerbose", "devtools.debugger.log.verbose"); > > -// When the testing flag is set, various behaviors may be altered from > -// production mode, typically to enable easier testing or enhanced > +/** > + * Settings `flags.testing = true` will toggle on certain behaviors that Nit: Setting
Attachment #8967770 -
Flags: review?(jryans) → review+
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
mozreview-review |
Comment on attachment 8967770 [details] Bug 1454000 - Add documentation for DevTools flags and their logging behavior; https://reviewboard.mozilla.org/r/236474/#review242268 ::: devtools/shared/DevToolsUtils.js:362 (Diff revision 2) > return true; > }; > > +/** > + * Dump with newline - This is a logging function that will only output when > + * the "wantLogging" flag is toggled, or the preference "devtools.debugger.log" These comments also mention writing to the flag, which won't actually work anymore.
Assignee | ||
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8967770 [details] Bug 1454000 - Add documentation for DevTools flags and their logging behavior; https://reviewboard.mozilla.org/r/236474/#review242332 ::: devtools/shared/DevToolsUtils.js:362 (Diff revision 2) > return true; > }; > > +/** > + * Dump with newline - This is a logging function that will only output when > + * the "wantLogging" flag is toggled, or the preference "devtools.debugger.log" Nice catch, thanks.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Pushed by gtatum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/208bfd37417e Add documentation for DevTools flags and their logging behavior; r=jryans
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/208bfd37417e
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•