A Chrome DevTools extension that collects console logs and network activity, then uses the Google Gemini AI to analyze potential issues and suggest solutions, helping you debug web applications faster.
Debugging web applications often involves manually sifting through potentially hundreds of console logs and network requests to pinpoint errors or performance bottlenecks. This can be time-consuming and tedious.
Lovable AI Debug Helper aims to streamline this process by leveraging the power of AI to automatically analyze common debugging data and provide a concise summary of potential problems and actionable next steps.
- Custom DevTools Panel: Adds a dedicated "Lovable AI" panel to your Chrome DevTools.
- Data Collection:
- Captures recent Console Logs (errors, warnings, logs) occurring after interception starts. (Note: Capturing pre-existing logs has limitations).
- Fetches a summary of Network Activity via HAR, highlighting errors (4xx/5xx) and slow requests.
- AI-Powered Analysis:
- Generates a detailed prompt containing the collected debug data.
- Sends the prompt to the Google Gemini API for analysis.
- Displays the AI's response, typically including:
- Identification of potential errors.
- A summary of the likely underlying issues.
- Specific suggestions for fixes or further debugging steps.
- Convenience:
- Securely stores your Gemini API key locally (using
chrome.storage.local
). - Allows easy copying of the generated prompt sent to the AI.
- Securely stores your Gemini API key locally (using
As this extension is not yet published on the Chrome Web Store, you need to load it manually:
- Download: Download the source code (or clone the repository).
- Unzip: If downloaded as a ZIP, unzip the file.
- Open Chrome Extensions: Open Chrome and navigate to
chrome://extensions/
. - Enable Developer Mode: Ensure the "Developer mode" toggle in the top-right corner is enabled.
- Load Unpacked: Click the "Load unpacked" button.
- Select Folder: Navigate to and select the directory containing the extension's files (the folder with
manifest.json
inside). - The "Lovable AI Debug Helper" extension should now appear in your list of extensions.
- Open DevTools: Navigate to the web page you want to debug and open Chrome DevTools (Right-click -> Inspect, or press F12).
- Select Panel: Find and click on the "Lovable AI" tab in the DevTools panel bar.
- Configure API Key:
- Obtain a Google Gemini API Key from Google AI Studio or Google Cloud Console.
- Paste your API key into the designated input field in the extension panel.
- Click "Save Key". (See Configuration section below for security notes).
- Collect Data:
- Click "Collect Console Logs" to start intercepting new logs.
- Click "Collect Network Errors" to get a HAR summary.
- Interact with the web page to trigger the behavior you want to debug.
- Generate Prompt: Click "Generate Lovable Prompt". This prepares the data and instructions for the AI. You can review this in the text area.
- Analyze: Click "Send to AI". The extension will send the generated prompt to the Gemini API.
- View Results: The AI's analysis and suggestions will appear in the "AI Response" section.
- Copy (Optional): Use the "Copy Prompt" button if you need the exact text sent to the AI.
- This extension requires a Google Gemini API Key to function.
- You can generate a free key suitable for development purposes from Google AI Studio.
- Security Warning: The API key is stored locally on your machine using
chrome.storage.local
. While this is standard practice for extensions, be aware that extensions have access to this storage. Do not use API keys with broad permissions or production quotas for development tools if possible. Never share your API key or commit it to Git.
- Chrome Extension Manifest V3
- JavaScript (ES6+)
- HTML5
- CSS3
- Google Gemini API
This is an open-source project, and contributions are welcome!
- Reporting Bugs: If you find a bug, please open an issue on GitHub detailing the problem, steps to reproduce, and expected behavior.
- Suggesting Features: Have an idea? Open an issue to discuss new features or improvements.
- Submitting Changes:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a Pull Request.
This project is licensed under the MIT License - see the LICENCE file for details.