Add "start-debugger-server" CLI option to Firefox

RESOLVED FIXED in Firefox 37

Status

RESOLVED FIXED
4 years ago
7 months ago

People

(Reporter: jryans, Assigned: jryans)

Tracking

(Depends on: 1 bug, {dev-doc-complete})

Trunk
Firefox 37
dev-doc-complete

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Bug 942756 almost landed, which would have added "start-debugger-server" support to all Gecko apps.

Instead of trying to revive that massive patch, let's do the simple thing to just add this option (which b2g already supports) to Firefox as well.
(Assignee)

Updated

4 years ago
See Also: → bug 942756
(Assignee)

Updated

4 years ago
Assignee: nobody → jryans
Status: NEW → ASSIGNED
(Assignee)

Comment 1

4 years ago
Created attachment 8546822 [details]
MozReview Request: bz://1119894/jryans
Attachment #8546822 - Flags: review?(past)
(Assignee)

Comment 2

4 years ago
/r/2305 - Bug 1119894 - Add start-debugger-server to Firefox. r=past

Pull down this commit:

hg pull review -r ab322343c132f91ec180593ac0f38185c9dbd26b
Haven't looked at this in detail yet, but it doesn't seem to support toggling the server via the "enable remote debugging" checkbox, like the original patch did. Is this intentional? Are the use cases we care about not terribly interested in that amount of control?
https://reviewboard.mozilla.org/r/2305/#review1535

Looks good to me otherwise.

::: browser/devtools/devtools-clhandler.js
(Diff revision 1)
> +             "Start the debugger server on a TCP port or Unix socket path.\n",

"Unix domain socket" would be more accurate. I was also thinking that it would be more user-friendly to default to port 6000 when the user doesn't specify a port or path, but I'm not sure that nsICommandLine can easily do that. Bonus points if you know how to do it though!
Attachment #8546822 - Flags: review?(past) → review+
(Assignee)

Comment 7

4 years ago
(In reply to Panos Astithas [:past] from comment #4)
> Haven't looked at this in detail yet, but it doesn't seem to support
> toggling the server via the "enable remote debugging" checkbox, like the
> original patch did. Is this intentional? Are the use cases we care about not
> terribly interested in that amount of control?

You are right, it does not.  We can add that separately later on if we wish.

I was hoping to address two use cases:

1. node-firefox wants an easy way to get Firefox listening on a port[1]
2. A user tweeted[2] about this and clarified over email that they would like a CLI option for this

An important note is that this doesn't help if Firefox is already running, at least not on Mac where remoting doesn't really work, so we'd need something else still for that case.

[1]: https://github.com/mozilla/node-firefox/issues/4
[2]: https://twitter.com/icoderforfun/status/552733995818319872
(Assignee)

Comment 8

4 years ago
https://reviewboard.mozilla.org/r/2305/#review1549

> "Unix domain socket" would be more accurate. I was also thinking that it would be more user-friendly to default to port 6000 when the user doesn't specify a port or path, but I'm not sure that nsICommandLine can easily do that. Bonus points if you know how to do it though!

I've corrected the help text.

Actually, it is possible to default the port with a sprinkling of try/catch.  Updated to do this and mention it in help text.
(Assignee)

Updated

4 years ago
Keywords: dev-doc-needed
https://hg.mozilla.org/mozilla-central/rev/7536897c179d
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 37
I think the main use case for this is connecting the developer tools to a different instance of Desktop Firefox, is that right? So I've documented this in the "remote debugging/Connecting Desktop Firefox" page: https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_Desktop. I've also made some fairly major updates to that page, would appreciate a review.

I also added it to this page: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options, which could use some other updates to be honest, but I don't have the strength for that now.
Flags: needinfo?(jryans)
(Assignee)

Comment 12

4 years ago
(In reply to Will Bamberg [:wbamberg] from comment #11)
> I think the main use case for this is connecting the developer tools to a
> different instance of Desktop Firefox, is that right?

Right, that's correct!  Incidentally, b2g desktop also supports the same option, but I am not sure if that's really worth mentioning anywhere...

> So I've documented
> this in the "remote debugging/Connecting Desktop Firefox" page:
> https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/
> Debugging_Firefox_Desktop. I've also made some fairly major updates to that
> page, would appreciate a review.
> 
> I also added it to this page:
> https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options, which
> could use some other updates to be honest, but I don't have the strength for
> that now.

Great, these docs look good to me!
Flags: needinfo?(jryans)
Keywords: dev-doc-needed → dev-doc-complete
(Assignee)

Comment 13

4 years ago
Comment on attachment 8546822 [details]
MozReview Request: bz://1119894/jryans
Attachment #8546822 - Attachment is obsolete: true
Attachment #8619095 - Flags: review+
(Assignee)

Comment 14

4 years ago
Created attachment 8619095 [details]
MozReview Request: Bug 1119894 - Add start-debugger-server to Firefox. r=past

Updated

7 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.