get_all_debug_activity
Retrieve a combined feed of all debug events on the Firefox MCP Server, enabling detailed monitoring and troubleshooting of browser automation activities. Specify tab ID, time range, and event limit for precise debugging.
Instructions
Get combined feed of all debug events
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| since | No | ||
| tabId | No |
Implementation Reference
- index-multi-debug.js:815-856 (handler)The core handler function for 'get_all_debug_activity'. Aggregates debug events from multiple sources (console, errors, network, WebSocket), sorts by timestamp, applies optional filters (since, limit), and returns a combined JSON feed.async getAllDebugActivity(args = {}) { const { tabId, since, limit = 100 } = args; const effectiveTabId = tabId || this.activeTabId; // Combine all debug events with timestamps const allEvents = []; // Console logs const logs = this.consoleLogs.get(effectiveTabId) || []; logs.forEach(log => allEvents.push({ ...log, source: 'console' })); // JavaScript errors const errors = this.jsErrors.get(effectiveTabId) || []; errors.forEach(error => allEvents.push({ ...error, source: 'error' })); // Network activity const network = this.networkActivity.get(effectiveTabId) || []; network.forEach(activity => allEvents.push({ ...activity, source: 'network' })); // WebSocket messages (get from page) if (this.pages.has(effectiveTabId)) { const page = this.pages.get(effectiveTabId); const wsMessages = await page.evaluate(() => window._wsMessages || []); wsMessages.forEach(msg => allEvents.push({ ...msg, source: 'websocket' })); } // Sort by timestamp allEvents.sort((a, b) => a.timestamp - b.timestamp); // Filter by since let filtered = since ? allEvents.filter(event => event.timestamp >= since) : allEvents; // Limit results filtered = filtered.slice(-limit); return { content: [{ type: 'text', text: `All Debug Activity (${filtered.length} events):\n` + JSON.stringify(filtered, null, 2) }] }; }
- index-multi-debug.js:364-375 (registration)Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.{ name: 'get_all_debug_activity', description: 'Get combined feed of all debug events', inputSchema: { type: 'object', properties: { tabId: { type: 'string' }, since: { type: 'number' }, limit: { type: 'number', default: 100 } } } },
- index-multi-debug.js:453-454 (registration)Dispatcher case in CallToolRequestSchema handler that routes tool calls to the getAllDebugActivity method.case 'get_all_debug_activity': return await this.getAllDebugActivity(args);