ErrorBuddy PRO 🚀
ErrorBuddy PRO is your ultimate companion for debugging. It transforms cryptic compiler errors into human-readable explanations in both English and Hindi, provides one-click AI assistance via Gemini, and can even read your errors aloud.
✨ Features
🔍 Human-Readable Explanations
Stop scratching your head over TypeError: Cannot read properties of undefined (reading 'split'). ErrorBuddy maps common errors to simple explanations.
- Bilingual Support: Explanations provided in English (EN) and Hindi (HI).
- Severity Indicators: Quickly identify if an issue is a Critical Error, Warning, or just a Hint.
🤖 Gemini AI Integration
Need a deeper dive? Use the built-in Gemini AI integration to:
- Analyze the surrounding code context (up to 12 lines).
- Get a customized fix tailored to your specific file and language.
- Suggest the "next move" for your debugging session.
🎙️ ErrorBuddy Voice
Accessibility meets convenience. With a single click from the Status Bar, ErrorBuddy will read the error summary and suggested fix aloud using text-to-speech.
💡 Quick Fixes & Inline Decorations
- Inline Summaries: See a brief summary of errors directly at the end of the line in your editor.
- Code Actions: Apply suggested fixes instantly with the "Apply Buddy Fix" quick-fix lightbulb.
- Stack Overflow Search: One-click search link in the hover menu for when you need the community's help.
🛠️ Setup & Configuration
1. Installation
Install the extension via the VS Code Marketplace.
2. Gemini API Key (Optional but Recommended)
To use the "Explain with Gemini" feature, you need an API key from Google AI Studio.
- Open the Command Palette (
Ctrl+Shift+P or Cmd+Shift+P).
- Type "ErrorBuddy: Set Gemini API Key".
- Paste your key and press Enter. Your key is stored securely in the VS Code Secret Storage.
⌨️ Commands
| Command |
Description |
ErrorBuddy: Set Gemini API Key |
Securely store your Gemini API key for AI explanations. |
ErrorBuddy: Explain with AI |
Sends the current error and code context to Gemini for a detailed fix. |
ErrorBuddy: Read Error Aloud |
Uses text-to-speech to read the error summary. |
📖 Supported Errors (Dictionary)
The extension includes a built-in dictionary for common pitfalls across multiple languages:
- Null Pointer/Nullable References
- Index Out of Bounds
- Undefined Variables
- Division by Zero
- Python Indentation Errors
- ...and many more!
🖥️ Extension Architecture
The extension is built with high-performance event listeners to ensure your editor remains snappy:
- Decorations: Updated only on text changes or cursor movement.
- Hovers: Dynamic Markdown generation with trusted command links.
- Webview Audio: A lightweight, headless webview handles the
SpeechSynthesis API for voice playback.
🤝 Contributing
Have a common error you want to add to the dictionary?
- Open
dictionary.ts.
- Add a new Regex-based entry.
- Submit a Pull Request!
Happy Coding with ErrorBuddy PRO! ✌️