I. Debug Preparation
1. Press Ctrl+Shift+I or go to Tools -> Web Developer -> Toggle Tools
2. Press Toolbox Options in the right corner
3. In the Advanced settings group check
Enable chrome and add-on debugging Enable remote debugging
4. Close the toolbox
II. Starting Debugger
II.1 PC Debugging
II.1.1. Restartless addons
1. Press Ctrl+Shift+A or go to Tools -> Add-ons
2. Press Debug for an addon you need
3. In Incoming Connection dialog press OK
4. Go to Debugger tab
5. Set breakpoints and work
II.1.2. All addons (XUL and restartless)
1. Go to Tools -> Web Developer -> Browser Toolbox (Alt+T+W+E)
2. In Incoming Connection dialog press OK
3. Go to Debugger tab
4. Wait until all scripts are loaded
5. Find your addon id in the left panel (they are organized alphabetically) or type a script name (main.js) in the search box and select a file with your addon in the path
6. Set breakpoints and work
II.2. Android Debugging
1. On Android go to Settings -> Developer options
2. If no Developer options menu go to Settings -> About and tap Build number 7 times. It should reveal Developer options menu.
3. Check USB debugging in the Developer options
4. Connect device with USB
5. On PC install Android SDK from the direct link for Windows or go to SDK Tools Only section of the SDK page.
6. Install the Android Platform Tools leaving the checkbox on after the SDK installation or running the file to start SDK Manager
C:\Users\[username]\AppData\Local\Android\android-sdk\tools\android.bat
7. Go to the folder
C:\Users\[username]\AppData\Local\Android\android-sdk\platform-tools
8. Add the folder path to the PATH system variable.
- Win+R -> “sysdm.cpl”
- Go to Advanced tab -> Environment Variables -> System variables -> Path
- Press Edit, copy the text and insert it into a text editor
- Check the path to platform-tools is in the text, if not copy the path from the folder
- Paste edited path text from the editor to the Path edit dialog and confirm.
9. Check all is correct, Win+R -> “cmd”, type the command
adb devices
It will output the list of attached devices.
10. On Android open Firefox
11. Go to Settings -> Developer tools
12. Check Remote debugging
13. On PC do Win+R -> “cmd” and type command to set up the port
adb forward tcp:6000 localfilesystem:/data/data/org.mozilla.firefox/firefox-debugger-socket
14. Open Firefox and go to Tools -> Web Developer -> Connect…
15. Press Connect
16. On Android confirm the Incoming connection
17. On PC Firefox select addon to debug and set breakpoint in the Debugger window.