Firefox Extension Development Workflow

Prerequisites

  1. Firefox Developer Edition (Recommended)
  2. web-ext CLI Tool (Already installed)

Development Commands

Start Development Server

cd extension-firefox
npm run dev

This will:

Build Extension

cd extension-firefox
npm run build

Creates a distributable .zip file in web-ext-artifacts/

Lint Extension

cd extension-firefox
npm run lint

Validates manifest.json and checks for common issues

Test Extension

cd extension-firefox
npm run test

Launches Firefox with debugging page open

Manual Testing Workflow

Loading Extension Manually

  1. Open Firefox
  2. Navigate to about:debugging
  3. Click “This Firefox”
  4. Click “Load Temporary Add-on”
  5. Select extension-firefox/manifest.json

Debugging Steps

  1. Console Logging: Check Browser Console (Ctrl+Shift+J)
  2. Extension Inspector: Use “Inspect” button in about:debugging
  3. Background Script: Debug in Extension Inspector
  4. Content Scripts: Debug in regular DevTools on target pages
  5. Popup: Right-click popup → “Inspect Element”

Firefox-Specific Testing Areas

Core Functionality

Browser API Compatibility

UI/UX Testing

Performance Testing

Troubleshooting

Common Issues

  1. Extension won’t load: Check manifest.json syntax
  2. API errors: Verify WebExtensions API usage
  3. Storage issues: Check IndexedDB permissions
  4. UI rendering: Verify CSS compatibility with Firefox

Debug Tools

Firefox Version Testing

Test across these Firefox versions:

Performance Monitoring

Monitor these metrics: