Closed
Bug 1378480
Opened 7 years ago
Closed 7 years ago
Pipe Browser Toolbox stdout and stderr to terminal
Categories
(DevTools :: Framework, enhancement)
DevTools
Framework
Tracking
(firefox56 fixed)
RESOLVED
FIXED
Firefox 56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
References
Details
Attachments
(1 file)
We should pipe the Browser Toolbox process' stdout and stderr up to the parent, so that it reaches the developer's terminal (if there is one).
This should ease finding problems like bug 1377326.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8883690 [details]
Bug 1378480 - Dump Browser Toolbox stdout to terminal.
https://reviewboard.mozilla.org/r/154600/#review159682
I was actually planning to add a Subprocess option to just let the process inherit stdout for this, but I guess this is fine in the mean time.
::: devtools/client/framework/ToolboxProcess.jsm:283
(Diff revision 1)
>
> dumpn("Chrome toolbox is now running...");
> this.emit("run", this);
>
> proc.stdin.close();
> + let dumpPipe = async function (pipe) {
Nit: No need for `let`. Just `async function dumpPipe(pipe)` or, if you do use `let`, `let dumpPipe = async pipe => { ... }`
::: devtools/client/framework/ToolboxProcess.jsm:284
(Diff revision 1)
> + let data = await pipe.readString();
> + while (data) {
> + dump(data);
> + data = await pipe.readString();
> + }
I generally prefer something like:
let data;
while ((data = await pipe.readString())) {
dump(data);
}
but I guess it's fine either way.
Attachment #8883690 -
Flags: review?(kmaglione+bmo) → review+
Comment 4•7 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #0)
> We should pipe the Browser Toolbox process' stdout and stderr up to the
> parent, so that it reaches the developer's terminal (if there is one).
>
> This should ease finding problems like bug 1377326.
Note that that problem started before we switched to Subprocess, when the browser toolbox still automatically inherited stdout and stderr, but no-one seemed to notice it until it caused problems.
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Kris Maglione [:kmag] from comment #4)
> (In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #0)
> > We should pipe the Browser Toolbox process' stdout and stderr up to the
> > parent, so that it reaches the developer's terminal (if there is one).
> >
> > This should ease finding problems like bug 1377326.
>
> Note that that problem started before we switched to Subprocess, when the
> browser toolbox still automatically inherited stdout and stderr, but no-one
> seemed to notice it until it caused problems.
Yeah, it's definitely not a guarantee that action is taken... but it at least makes it a bit easier!
Assignee | ||
Comment 6•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8883690 [details]
Bug 1378480 - Dump Browser Toolbox stdout to terminal.
https://reviewboard.mozilla.org/r/154600/#review159682
> Nit: No need for `let`. Just `async function dumpPipe(pipe)` or, if you do use `let`, `let dumpPipe = async pipe => { ... }`
Thanks, didn't realize async and arrow funcs could be combined.
> I generally prefer something like:
>
> let data;
> while ((data = await pipe.readString())) {
> dump(data);
> }
>
> but I guess it's fine either way.
Haha, actually I started with that, but DevTools ESLint rules currently disapprove of assignment in loop conditions.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•7 years ago
|
||
Pushed by jryans@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fd669d55812d
Dump Browser Toolbox stdout to terminal. r=kmag
Comment 10•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•