Initial support for WiFi Debugging for Fennec

RESOLVED FIXED in Firefox 42

Status

()

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: jryans, Assigned: jryans)

Tracking

(Blocks: 3 bugs, {dev-doc-complete})

unspecified
Firefox 42
dev-doc-complete
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed, relnote-firefox 42+)

Details

Attachments

(4 attachments)

(Assignee)

Description

4 years ago
Initial support for Fennec WiFi debugging, to be refined as needed in follow ups.
(Assignee)

Updated

4 years ago
Blocks: 1180997
(Assignee)

Updated

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

Comment 2

4 years ago
Created attachment 8630292 [details]
MozReview Request: Bug 1180996 - Enable DevTools security on Android. r=margaret

Bug 1180996 - Enable DevTools security on Android. r=margaret
Attachment #8630292 - Flags: review?(margaret.leibovic)
(Assignee)

Comment 3

4 years ago
Created attachment 8630293 [details]
MozReview Request: Bug 1180996 - Extract remote debugger to separate file. r=margaret

Bug 1180996 - Extract remote debugger to separate file. r=margaret
Attachment #8630293 - Flags: review?(margaret.leibovic)
(Assignee)

Comment 4

4 years ago
Created attachment 8630294 [details]
MozReview Request: Bug 1180996 - Remote debugging via WiFi for Android. r=margaret

Bug 1180996 - Remote debugging via WiFi for Android. r=margaret
Attachment #8630294 - Flags: review?(margaret.leibovic)
(Assignee)

Comment 5

4 years ago
Created attachment 8630295 [details]
MozReview Request: Bug 1180996 - Basic device name on Android. r=margaret

Bug 1180996 - Basic device name on Android. r=margaret
Attachment #8630295 - Flags: review?(margaret.leibovic)
(Assignee)

Comment 6

4 years ago
Margaret, please redirect if there's a better person to review!  I wasn't sure.

With the patch set applied, you can try WiFi debugging with the following steps:

1. Fennec -> Settings -> Developer Tools -> Enable "Remote debugging via Wi-Fi"
2. Open WebIDE in desktop Firefox
3. Open the Runtime menu in WebIDE
4. Select your Android device, which should appear under Wi-Fi devices
5. On the device, choose "Scan" or "Scan and Remember" at the incoming connection prompt
6. Scan the QR code

From here, you can choose a debug target by accessing a tab or the main process from WebIDE's project list.
(Assignee)

Updated

4 years ago
Component: Developer Tools: WebIDE → General
Product: Firefox → Firefox for Android
Comment on attachment 8630292 [details]
MozReview Request: Bug 1180996 - Enable DevTools security on Android. r=margaret

https://reviewboard.mozilla.org/r/12697/#review11317

::: mobile/android/installer/package-manifest.in:134
(Diff revision 1)
> +@BINPATH@/components/devtools_security.xpt

I'm a bit concerned about this increasing our APK size for all users, when only some will use it. However, I looked at your try run, and it looks like the APK11+ build there is only about 2kb bigger than the current fx-team builds, so that's not really a big deal.
Attachment #8630292 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8630293 [details]
MozReview Request: Bug 1180996 - Extract remote debugger to separate file. r=margaret

https://reviewboard.mozilla.org/r/12699/#review11319

::: mobile/android/chrome/content/browser.js:130
(Diff revision 1)
> +  ["RemoteDebugger", "chrome://browser/content/RemoteDebugger.js"],

Yay lazy-loading! And yay for removing stuff from browser.js!

::: mobile/android/chrome/content/RemoteDebugger.js:11
(Diff revision 1)
> +  init() {

Huh, I didn't know about this syntax (as opposed to `propertyName: function()`). Is this new?
Attachment #8630293 - Flags: review?(margaret.leibovic) → review+
(Assignee)

Comment 9

4 years ago
(In reply to :Margaret Leibovic from comment #8)
> ::: mobile/android/chrome/content/RemoteDebugger.js:11
> (Diff revision 1)
> > +  init() {
> 
> Huh, I didn't know about this syntax (as opposed to `propertyName:
> function()`). Is this new?

New-ish, I guess.  Added in Firefox 34 it appears[1].

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla#Other_features

Updated

4 years ago
Attachment #8630294 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8630294 [details]
MozReview Request: Bug 1180996 - Remote debugging via WiFi for Android. r=margaret

https://reviewboard.mozilla.org/r/12701/#review11321

I don't feel confident reviewing the debugger server parts of this, so you should probably have a devtools person give this a once-over as well. But I did test this out locally and it worked!

::: mobile/android/base/DevToolsAuthHelper.java:21
(Diff revision 1)
> +        final Intent intent = InputOptionsUtils.createQRCodeReaderIntent();

Sweet, this is some new code that you're using :)

::: mobile/android/base/locales/en-US/android_strings.dtd:159
(Diff revision 1)
> +<!ENTITY pref_developer_remotedebugging_wifi "Remote debugging via Wi-Fi">

In testing this, and in talking to Karim, I realized that this only works if you have a specific QR code reader app installed [1]. You may want to mention that here, or link to this in the MDN docs.

[1] https://play.google.com/store/apps/details?id=com.google.zxing.client.android
Comment on attachment 8630295 [details]
MozReview Request: Bug 1180996 - Basic device name on Android. r=margaret

https://reviewboard.mozilla.org/r/12703/#review11325

Ship It!
Attachment #8630295 - Flags: review?(margaret.leibovic) → review+
(Assignee)

Comment 12

4 years ago
https://reviewboard.mozilla.org/r/12701/#review11345

Panos, could you review the RemoteDebugger.js file here?  It's similar to the FxOS changes made for WiFi debugging.
(Assignee)

Comment 13

4 years ago
Comment on attachment 8630294 [details]
MozReview Request: Bug 1180996 - Remote debugging via WiFi for Android. r=margaret

Bug 1180996 - Remote debugging via WiFi for Android. r=margaret
Attachment #8630294 - Flags: review?(past)
Attachment #8630294 - Flags: review?(margaret.leibovic)
Attachment #8630294 - Flags: review+
(Assignee)

Comment 14

4 years ago
Comment on attachment 8630294 [details]
MozReview Request: Bug 1180996 - Remote debugging via WiFi for Android. r=margaret

Keeping Margaret's r+.
Attachment #8630294 - Flags: review?(margaret.leibovic) → review+
(Assignee)

Comment 15

4 years ago
https://reviewboard.mozilla.org/r/12701/#review11321

> In testing this, and in talking to Karim, I realized that this only works if you have a specific QR code reader app installed [1]. You may want to mention that here, or link to this in the MDN docs.
> 
> [1] https://play.google.com/store/apps/details?id=com.google.zxing.client.android

Right, good point!  I think MDN docs might be right place for this at the moment.
(Assignee)

Comment 16

4 years ago
Talos / Autophone Try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6266b7786af
Keywords: dev-doc-needed
Comment on attachment 8630294 [details]
MozReview Request: Bug 1180996 - Remote debugging via WiFi for Android. r=margaret

https://reviewboard.mozilla.org/r/12701/#review11489

Ship It!
Attachment #8630294 - Flags: review?(past) → review+
(Assignee)

Comment 18

4 years ago
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #16)
> Talos / Autophone Try:
> 
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6266b7786af

My first time looking at Autophone, but from what I can tell these patches have not altered Talos or Autophone results.  Seems safe to land.
https://hg.mozilla.org/mozilla-central/rev/548ea0123943
https://hg.mozilla.org/mozilla-central/rev/1e83acbe8946
https://hg.mozilla.org/mozilla-central/rev/57300bbb8aa8
https://hg.mozilla.org/mozilla-central/rev/3ed620385cca
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
(Assignee)

Updated

3 years ago
Blocks: 1185811
(Assignee)

Comment 21

3 years ago
Release Note Request (optional, but appreciated)
[Why is this notable]: Important feature for developer usability
[Suggested wording]: Debug websites over WiFi (no USB cable or ADB needed)
[Links (documentation, blog post, etc)]: https://convolv.es/blog/2015/08/05/wifi-debug-fennec/
relnote-firefox: --- → ?
Added to the release notes with "Remote website debugging over WiFi (no USB cable or ADB needed)" as wording.
Using your blog post for now but having non-personnal blog post would be appreciated
relnote-firefox: ? → 42+
Docs page, shamelessly stolen from your blog: https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_over_Wifi.

Let me know if this is OK.

Note that I've also relocated the stuff on connecting to Firefox OS into separate pages:
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_OS_over_USB
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_OS_over_Wifi

...to make things more consistent. All these pages are listed under https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging.
Flags: needinfo?(jryans)
(Assignee)

Comment 24

3 years ago
(In reply to Will Bamberg [:wbamberg] from comment #23)
> Docs page, shamelessly stolen from your blog:
> https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/
> Debugging_Firefox_for_Android_over_Wifi.
> 
> Let me know if this is OK.

Yes, fine with me!

> Note that I've also relocated the stuff on connecting to Firefox OS into
> separate pages:
> https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/
> Debugging_Firefox_OS_over_USB
> https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/
> Debugging_Firefox_OS_over_Wifi
> 
> ...to make things more consistent. All these pages are listed under
> https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging.

Great, this looks good to me!

Also, it seems fine to remove the pre-36 Android instructions.
Flags: needinfo?(jryans)
(Assignee)

Comment 25

3 years ago
Sylvestre, you can update the relnote with the new MDN link:

https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_for_Android_over_Wifi
Flags: needinfo?(sledru)
Thanks, updated!
Flags: needinfo?(sledru)
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.