Firefox/Windows 8 Integration: Difference between revisions

Line 460: Line 460:
* They have been refactoring & improving their tools, so it <strong>highly encouraged</strong> to use Nightly builds on both sides of the pairing if possible.
* They have been refactoring & improving their tools, so it <strong>highly encouraged</strong> to use Nightly builds on both sides of the pairing if possible.


* Before you start
=== Before you start ===
** You must have metro installed & working
* You must have metro installed & working
** You must access to a classic/desktop fx. This need not be a local build
* You must access to a classic/desktop fx. This need not be a local build
** If you are connecting remotely, you must make sure both machines can ping each other before starting. This will save you a lot of grief later
* If you are connecting remotely, you must make sure both machines can ping each other before starting. This will save you a lot of grief later
*** on windows ipconfig in the cmdline is helpful in getting your ip address
** on windows ipconfig in the cmdline is helpful in getting your ip address
*** on windows 8 this usually means disabling the firewall (not encouraged) or adding inbound/outbound firewall rules to allow them to connect.
** on windows 8 this usually means disabling the firewall (not encouraged) or adding inbound/outbound firewall rules to allow them to connect.
**** If you need it, Peter in IT now knows a fair bit about setting up those rules if you get lost or stuck.
*** If you need it, Peter in IT now knows a fair bit about setting up those rules if you get lost or stuck.
** If you are on wifi, both devices must be on the same network to communicate. Mozilla != Mozilla-G.  
* If you are on wifi, both devices must be on the same network to communicate. Mozilla != Mozilla-G.  
*** It sounds silly but some of the windows devices only see Mozilla-G and the older company issued thinkpads do not have the hardware for it.
** It sounds silly but some of the windows devices only see Mozilla-G and the older company issued thinkpads do not have the hardware for it.


* Setup
=== Setup ===
** Go to about:config on classic/desktop fx
* Go to about:config on classic/desktop fx
*** devtools.debugger.force-local -> false
** devtools.debugger.force-local -> false
*** devtools.debugger.remote-enabled -> true
** devtools.debugger.remote-enabled -> true
*** Check that these values are what you want
** Check that these values are what you want
**** devtools.debugger.remote-port -> 6000 (I'd leave this one alone unless you have a compelling reason to change it)
*** devtools.debugger.remote-port -> 6000 (I'd leave this one alone unless you have a compelling reason to change it)
*** If you don't have these, you'll probably want these as well
** If you don't have these, you'll probably want these as well
**** devtools.debugger.log -> true
*** devtools.debugger.log -> true
**** browser.dom.window.dump.enabled  -> true
*** browser.dom.window.dump.enabled  -> true
** Restart classic/desktop fx
* Restart classic/desktop fx
*** You need to restart for the next step to work.
** You need to restart for the next step to work.
** Navigate Firefox button -> Web Developer -> "Connect.." entry between the Error Console" & "Get More Tools" Entry
* Navigate Firefox button -> Web Developer -> "Connect.." entry between the Error Console" & "Get More Tools" Entry
*** https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up is what this step is based on
** https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up is what this step is based on
** Go to about:config on metrofx
* Go to about:config on metrofx
*** devtools.debugger.force-local -> false
** devtools.debugger.force-local -> false
*** devtools.debugger.remote-enabled -> true
** devtools.debugger.remote-enabled -> true
*** and you may want
** and you may want
**** devtools.debugger.log -> true
*** devtools.debugger.log -> true
**** devtools.errorconsole.enabled -> true
*** devtools.errorconsole.enabled -> true
**** browser.dom.window.dump.enabled  -> true
*** browser.dom.window.dump.enabled  -> true
*** devtools.debugger.remote-port -> 6000 (again I'd leave this one alone)
** devtools.debugger.remote-port -> 6000 (again I'd leave this one alone)
*** It is unclear if a restart is required. I frequently do in the test-build-dev cycle anyway.
** It is unclear if a restart is required. I frequently do in the test-build-dev cycle anyway.
** Make sure metrofx is started (and not suspended)
* Make sure metrofx is started (and not suspended)
** In classic fx, click the "Connect..." entry  
* In classic fx, click the "Connect..." entry  
*** Depending on your version, this will launch a new tab or a new panel on firefox
** Depending on your version, this will launch a new tab or a new panel on firefox
*** Enter the ip of metrofx if you are connecting remotely and the port number if you've changed them.
** Enter the ip of metrofx if you are connecting remotely and the port number if you've changed them.
*** If you are connecting on a localhost, you shouldn't need to change the default settings.
** If you are connecting on a localhost, you shouldn't need to change the default settings.
** Click the connect button in classic fx
* Click the connect button in classic fx
** On metrofx a strap(the metro version of the modal dialog) will appear about an incoming connection.
* On metrofx a strap(the metro version of the modal dialog) will appear about an incoming connection.
*** Click/tap "allow"
** Click/tap "allow"
** On classic fx, the connect page will reload with a list of active tabs & processes. Usually 'main process' is the most interesting.
* On classic fx, the connect page will reload with a list of active tabs & processes. Usually 'main process' is the most interesting.
** The devtools console will appear & the aforementioned tab on classic fx will disappear
* The devtools console will appear & the aforementioned tab on classic fx will disappear
** Sally forth & debug!
* Sally forth & debug!


* Notes
=== Notes ===
** I usually pair on localhost, using an external monitor so I can see metrofx & classicfx at the same time.
* I usually pair on localhost, using an external monitor so I can see metrofx & classicfx at the same time.
** If you are using localhost without an external monitor, beware of windows suspending the metrofx while its waiting for the incoming connection. This will cause the pairing to fail.
* If you are using localhost without an external monitor, beware of windows suspending the metrofx while its waiting for the incoming connection. This will cause the pairing to fail.
** While you can pair classic/metrofx running out of the same obj dir, I frequently experienced unexpected hangs and crashes as a result.
* While you can pair classic/metrofx running out of the same obj dir, I frequently experienced unexpected hangs and crashes as a result.
** if you close the devtools window, this usually results in the metro browser shutting down
* if you close the devtools window, this usually results in the metro browser shutting down


=== Using DevTools Profiler ===
=== Using DevTools Profiler ===
Confirmed users
1,982

edits