Closed Bug 1119894 Opened 9 years ago Closed 9 years ago

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

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 37

People

(Reporter: jryans, Assigned: jryans)

References

(Depends on 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

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: nobody → jryans
Status: NEW → ASSIGNED
/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+
(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
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.
https://hg.mozilla.org/mozilla-central/rev/7536897c179d
Status: ASSIGNED → RESOLVED
Closed: 9 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)
(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)
Attachment #8546822 - Attachment is obsolete: true
Attachment #8619095 - Flags: review+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: