An AI-driven super debugger that analyzes, explains, and fixes bugs directly within VS Code. Instead of just showing errors, it helps you understand them, suggests fixes, and can even auto-fix them with explanations.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
AI DebugSense is an innovative VS Code extension that uses AI to analyze, explain, and fix bugs directly within your editor. Instead of just showing errors, it helps you understand them, suggests fixes, and can even auto-fix them with explanations.
Features
🔍 Auto-Debugging & Fix Suggestions
AI detects common patterns and suggests context-aware fixes
Explains why bugs happen and offers multiple fix options
🎯 Smart Stack Trace Analysis
Summarizes long stack traces
Highlights the real cause of errors
Detects common pitfalls (null pointer issues, infinite loops, memory leaks)
⚡ Performance Bottleneck Detection
Analyzes runtime performance
Flags inefficient code
Suggests optimized alternatives with reasoning
Requirements
VS Code 1.97.0 or higher
Node.js 16.x or higher
OpenAI API key (set in .env file)
Installation
Clone this repository
Create a .env file in the root directory with your OpenAI API key:
OPENAI_API_KEY=your-api-key-here
Install dependencies:
npm install
Build the extension:
npm run compile
Package the extension:
npm install -g @vscode/vsce
vsce package
Usage
Open a file with code errors in VS Code
Use one of these methods to analyze errors:
Press Ctrl+Shift+A (Cmd+Shift+A on Mac)
Open Command Palette (Ctrl+Shift+P) and type "AI DebugSense: Analyze Current Error"
Right-click on error squiggles and select "AI DebugSense: Analyze Error"
Extension Settings
aiDebugSense.model: OpenAI model to use (default: "gpt-4-turbo-preview")