Logo Firefox Devtools

Firefox Devtools

Tổ chức
zenobi-us
firefox-devtools

Enables Firefox remote debugging workflows, when browser automation or protocol-level Firefox inspection is needed, resulting in configured Firefox RDP access and repeatable debugging steps.

Tổng quan

Nhà phát hànhzenobi-us
Kho mãdotfiles
Tên kỹ năngfirefox-devtools
Sao
67
Bản fork
6
Tệp đi kèm
10
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 10 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được zenobi-us công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Firefox Devtools trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/zenobi-us/dotfiles/tree/master/files/devtools/agent/bundles/developer/skills/browsers/firefox-devtools
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zenobi-us/dotfiles.git /tmp/dotfiles
mkdir -p .claude/skills
cp -r /tmp/dotfiles/files/devtools/agent/bundles/developer/skills/browsers/firefox-devtools .claude/skills/firefox-devtools
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Firefox Devtools trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Firefox Devtools ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Firefox Devtools không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Firefox DevTools Integration Skill

Purpose

Run scripts/analysis.ts directly for test coverage analysis. Run scripts/test-analysis.ts directly to execute the Bun test suite. This skill enables seamless integration of Firefox Remote Debugging Protocol (RDP) for development workflows, similar to Chrome DevTools integration. It configures Firefox to accept remote debugging connections and provides tooling to interact with browser instances programmatically.

Prerequisites

  • Firefox 55+ (RDP support)
  • Port 6000 available (or custom port)
  • Remote debugging enabled
  • Development environment setup

Core Concepts

Firefox Remote Debugging Protocol (RDP)

Unlike Chrome's Chrome DevTools Protocol (CDP), Firefox uses its own RDP over WebSocket connections on port 6000 by default.

Key differences from Chrome:

  • Transport: WebSocket instead of WebSocket (similar, but different protocol implementation)
  • Default Port: 6000 (vs Chrome's 9222)
  • Connection Type: Target-agnostic (works with tabs, workers, extensions)
  • Authentication: Optional origin header validation
  • Tools Available: Inspector, Debugger, Console, Network, Performance, Storage

Configuration Modes

1. Standard Remote Debugging

Enable Firefox to accept remote debugging connections:

bash
firefox --remote-debugging-port 6000
2. Profile-Based Configuration

Create a Firefox profile with debugging pre-enabled:

bash
firefox -profile /path/to/profile -remote-debugging-port 6000
3. Environment Variable Setup
bash
export MOZ_PROFILER_STARTUP=1
export MOZ_REMOTE_DEBUG_PORT=6000
firefox

Implementation Steps

Step 1: Enable Remote Debugging

javascript
// Via about:config in Firefox
devtools.debugger.remote-enabled = true
devtools.chrome.enabled = true
devtools.debugger.prompt-connection = false

Step 2: Connect DevTools Client

javascript
// Node.js example using RDP client
const { RDPClient } = require('firefox-rdp');

const client = new RDPClient({
  host: 'localhost',
  port: 6000
});

client.connect()
  .then(() => console.log('Connected to Firefox'))
  .catch(err => console.error('Connection failed:', err));

Step 3: Programmatic Debugging

Access browser capabilities through RDP:

  • Inspector: DOM manipulation and inspection
  • Debugger: JavaScript breakpoints and stepping
  • Console: Execute scripts and view logs
  • Network: Monitor and intercept requests
  • Performance: Profile runtime performance
  • Storage: Access cookies, localStorage, sessionStorage

Integration Points

1. Mise Configuration

toml
[tools.firefox-debug]
version = "latest"
env = { MOZ_REMOTE_DEBUG_PORT = "6000" }

2. Comtrya Provisioning

yaml
action: shell
description: "Enable Firefox Remote Debugging"
command: |
  firefox-preferences \
    --set devtools.debugger.remote-enabled=true \
    --set devtools.chrome.enabled=true \
    --set devtools.debugger.prompt-connection=false

3. MCPort Configuration

Similar to chrome-devtools-mcporter, create Firefox equivalents:

json
{
  "firefox-debug": {
    "binary": "firefox",
    "args": ["--remote-debugging-port", "6000"],
    "port": 6000,
    "protocol": "rdp"
  }
}

Common Tasks

Inspect DOM Elements

javascript
const { Inspector } = await client.getActor('inspector');
const nodeActor = await inspector.querySelector('body');
const attributes = await nodeActor.getAttributes();

Set JavaScript Breakpoint

javascript
const { Debugger } = await client.getActor('debugger');
const script = await debugger.getScript({ url: 'file.js' });
await debugger.setBreakpoint({ location: { scriptId: script.id, line: 10 } });

Execute Console Commands

javascript
const { Console } = await client.getActor('console');
const result = await console.evaluateJS('window.location.href');
console.log(result.value);

Monitor Network Requests

javascript
const { NetworkMonitor } = await client.getActor('networkMonitor');
networkMonitor.on('request', (req) => {
  console.log(`${req.method} ${req.url}`);
});

Tools and Libraries

RDP Clients

  • firefox-rdp - Raw RDP protocol client
  • webext-run - Run and debug WebExtensions
  • firefox-launcher - Programmatic Firefox launching

Integration Tools

  • firefox-devtools-adapter - Bridge between CDP and RDP
  • debug-protocol-converter - Convert between Chrome CDP and Firefox RDP

Development Tools

  • Firefox DevTools itself (can connect to remote instances)
  • Visual Studio Code extensions (Debugger for Firefox)
  • WebStorm/IntelliJ built-in Firefox debugging

Troubleshooting

Connection Refused

Cause: Firefox not listening on RDP port Solution:

bash
# Verify Firefox is running with debugging enabled
ps aux | grep firefox.*6000
# Or explicitly launch with port
firefox --remote-debugging-port 6000 &

Port Already in Use

Solution: Use custom port

bash
firefox --remote-debugging-port 7000 &
# Then connect to localhost:7000

Debugger Not Responding

Solution: Ensure prerequisites are met

bash
# Check about:config settings
about:config → devtools.debugger.remote-enabled = true
# Restart Firefox and reconnect

Authentication/Origin Errors

Solution: Configure CORS for RDP

javascript
client.setOriginHeader('http://localhost:3000');

Examples

Full Debugging Session

javascript
const { RDPClient } = require('firefox-rdp');

async function debugFirefox() {
  const client = new RDPClient({ host: 'localhost', port: 6000 });
  
  try {
    await client.connect();
    const tabs = await client.listTabs();
    const tab = tabs[0];
    
    const inspector = await tab.getActor('inspector');
    const console = await tab.getActor('console');
    
    // Inspect element
    const body = await inspector.querySelector('body');
    console.log('Body classes:', await body.getAttributes());
    
    // Execute console command
    const result = await console.evaluateJS('document.title');
    console.log('Page title:', result.value);
    
  } finally {
    await client.disconnect();
  }
}

debugFirefox().catch(console.error);

Integration with Build Tools

javascript
// webpack.config.js
module.exports = {
  devServer: {
    before(app) {
      app.use((req, res, next) => {
        res.setHeader('X-Debugger-Enabled', 'true');
        next();
      });
    }
  },
  // Connect to Firefox RDP for debugging
  devtool: 'eval-source-map'
};

Performance Considerations

  1. RDP Overhead: Remote debugging adds minimal overhead but disable in production
  2. Port Binding: Use high-numbered ports (>6000) to avoid conflicts
  3. Connection Pooling: Reuse RDP connections across multiple operations
  4. Memory: Firefox with debugging enabled uses ~10-15% more memory

Security Notes

  • Local Development Only: Only enable RDP on localhost in development
  • Network Isolation: Don't expose RDP port to untrusted networks
  • Session Management: Disconnect clients when finished
  • Credential Storage: Never log debugging credentials

References

Related Skills

  • files/devtools/chrome-devtools-mcporter - Chrome equivalent
  • superpowers/systematic-debugging - General debugging methodology
  • experts/quality-security/debugger - Debugging expert guidance
  • superpowers/frontend-developer - Frontend development context

Skill Metadata

  • Category: DevTools Integration
  • Complexity: Intermediate
  • Domain: Browser Debugging, Development Tools
  • Platforms: Linux, macOS, Windows
  • Languages: JavaScript, TypeScript, Python (via RDP client)
  • Last Updated: 2025-12-14

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Firefox Devtools làm được gì?

Enables Firefox remote debugging workflows, when browser automation or protocol-level Firefox inspection is needed, resulting in configured Firefox RDP access and repeatable debugging steps.

Vì sao nên dùng Firefox Devtools trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Firefox Devtools là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Firefox Devtools trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/zenobi-us/dotfiles/tree/master/files/devtools/agent/bundles/developer/skills/browsers/firefox-devtools. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Firefox Devtools?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Firefox Devtools với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Firefox Devtools với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Firefox Devtools có miễn phí không?

Có. Kỹ năng này được zenobi-us phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇