Debug WebExtensions in android

I have experimented a bit, and this works quite well:

  1. Connect the WebIDE to your phone from the PC

    • I already had adb set up such that adb devices listed my phone
    • then I followed this guide
  2. Set up Extension Auto-Installer on the phone

    • install the add-on from AMO
    • in the WebIDE, click Device Preferences on the right and append the local IP of your PC to extensions.autoinstaller.allowedIPs
  3. Select the Main Process as the debug target in the WebIDE

    • to run console scripts in the background page, select it like a frame at the top right of the debugger panel
  4. Push the extension package from the PC

    • pack your extension as a zip as you usually do
    • push it to your phones local IP
      • the add-on page suggests to use wget or curl
      • I do it from within my build script in node.js, on success the HTTP status is (sometimes?) 399
  5. Accept the extension on the phone

    • if everything works so far, dismiss the message that says Blocked Add-on
    • tap the new notification to install as a temporary unsigned add-on
  6. Have fun debugging. Repeat steps 4 and 5 as needed.

I did this with Firefox 52 beta x64 on my Windows 10 computer and a OnePlus X running CM 13 (Android 6.0.1), Firefox 52 beta and Extension Auto-Installer 1.3.