You can now open Browser Toolboxes on more than one instance of Firefox

58 views
Skip to first unread message

Brian Grinstead

unread,
Aug 25, 2017, 1:37:20 PM8/25/17
to Firefox Dev, dev-developer-tools
It used to be that if you opened the Browser Toolbox on more than one instance of Firefox, then all the Browser Toolboxes would end up connecting to the first instance. I know a lot of people have run into this problem, myself included. For instance:

./mach run --profile /tmp/1 --jsdebugger
./mach run --profile /tmp/2 --jsdebugger

Here both Browser Toolboxes would end up debugging the first instance of the browser. This is because the debugger server used a static port (6080) so when the second instance tried to start the debugger server it would fail, but the Browser Toolbox frontend didn't care and just connected to 6080 (the first instance).

I had an idea to make this better by letting you specify an explicit port for the second instance, but jryans had a much better idea, which was to randomly pick a port when starting the debugger server and send it along to the Browser Toolbox (https://bugzilla.mozilla.org/show_bug.cgi?id=1392744#c2). So it should be working automatically now - you should see dump output like: `Debugger Server for Browser Toolbox listening on port: 63148` after starting it.

Big thanks to Ryan, and happy debugging!
Brian
_______________________________________________
firefox-dev mailing list
firef...@mozilla.org
https://mail.mozilla.org/listinfo/firefox-dev

Patrick Brosset

unread,
Aug 28, 2017, 3:58:30 AM8/28/17
to Brian Grinstead, dev-developer-tools, Firefox Dev
And big thanks to you Brian for making our dev workflows better!

Jim Blandy

unread,
Sep 7, 2017, 7:03:32 PM9/7/17
to Brian Grinstead, dev-developer-tools, Firefox Dev
Would it be possible to connect through a Unix-domain socket located in the profile? I guess that wouldn't help on Windows.

J. Ryan Stinnett

unread,
Sep 7, 2017, 7:08:35 PM9/7/17
to Jim Blandy, Brian Grinstead, Firefox Dev, dev-developer-tools
On Thu, Sep 7, 2017 at 6:01 PM, Jim Blandy <jbl...@mozilla.com> wrote:
Would it be possible to connect through a Unix-domain socket located in the
profile? I guess that wouldn't help on Windows.

Should be doable for non-Windows, yes. Set `listener.portOrPath` to the socket path and similarly update the client.

(Can elaborate further if someone wants to do it!)

- Ryan

Jim Blandy

unread,
Sep 7, 2017, 7:14:30 PM9/7/17
to J. Ryan Stinnett, Brian Grinstead, Firefox Dev, dev-developer-tools
It's probably best to use the same code on all platforms. :(
Reply all
Reply to author
Forward
0 new messages