Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox remote debug "unexpected error" on Windows 8

I need debug a web application in Firefox for "Android". I am trying to connect the device to desktop Firefox, but always got the error "unexpected error".

I have performed all steps of https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android

  1. I installed the Android SDK Tools and Platforms, and the device is correctly detected with the adb command.

  2. I enabled remote debugging on desktop Firefox and Firefox for Android

  3. I enabled remote USB debugging on the device.

  4. The device is connected to the original cable to my PC.

  5. I run the command adb forward tcp: 6000 tcp: 6000 on the command line without problems.

  6. Finally, the developer desktop Firefox menu, I choose the connect option. Page appears to connect to localhost: 6000, and clicking on the "connect" button, the error "unexpected error" appears.

Any ideas?

like image 624
pabbec Avatar asked Apr 08 '15 11:04

pabbec


People also ask

How do I debug my Firefox extensions?

in the Firefox menu (or Tools menu if you display the menu bar or are on macOS), click Web Developer then Debugger. press Ctrl + Shift + i ( Command + Option + i on macOS) and click Debugger.


1 Answers

Found the solution!

Instead of typing:

adb forward tcp:6000 tcp:6000

type in the following:

adb forward tcp:6000 localfilesystem:/data/data/org.mozilla.firefox/firefox-debugger-socket

The first command is for firefox 34, for latter versions, you need the second.

Also, according to the docs:

For Firefox for Android builds in other channels, the org.mozilla.firefox part should be changed to:

  • org.mozilla.firefox_beta for Beta
  • org.mozilla.fennec_aurora for Aurora
  • org.mozilla.fennec for Nightly
like image 126
Lajos Mészáros Avatar answered Oct 30 '22 18:10

Lajos Mészáros