I already blogged about support for remote debugging in Firefox for Android. Now we have support for remote Web Console too!

The remote console, like remote debugging, requires using Desktop Firefox to connect to Mobile Firefox over USB using ADB. Remote console is supported in Firefox 19 and newer releases. Here’s a quick guide to getting started:

Firefox Desktop: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart. You should see a “Tools > Web Developer > Remote Web Console” menu.

Firefox for Android: Use about:config to enable remote debugging. Set the “devtools.debugger.remote-enabled” pref to true. Restart.

Firefox Desktop: Choose “Tools > Web Developer > Remote Web Console” and a Remote Connection dialog should open. If you changed none of the other remote debugging preferences, just use the defaults. Press OK.

Firefox for Android: You should see a remote connection prompt appear. Press OK to initialize the connection. You have 20 seconds, by default, to accept the connection. You can retry 3 times.

Firefox Desktop: Once the connection is accepted, you should see a scope prompt. The prompt is used to pick the tab, or global, scope you want to attach to the web console.

Firefox Desktop: After picking a scope, you should see a Web Console window appear.

Once you have the Web Console up and running, you can do pretty much everything the desktop version can do. For example, you can load a web page and monitor the network activity, including viewing the network request details:

You can also use the JS console to execute JS code in the scope of the web page running on the Android device! Pretty cool!

[…] Unfortunately these tools currently lack integrated inspection utils (e.g. console.log/console.dir or MozRepl repl.inspect and repl.search), so during the presentation I opted to install MozRepl as extension on the B2G simulator, but in the last weeks Remote WebConsole landed into Firefox Nightly. […]