Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Bug2BrainNew to Visual Studio Code? Get it now.
Bug2Brain

Bug2Brain

AnandShah

|
3 installs
| (0) | Free
Bug2Brain turns your real coding mistakes into a personalized learning curriculum — micro-exercises, revision cards, and concept tracking, generated from the errors you actually make.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bug2Brain 🧠

GitHub stars License GitHub issues GitHub last commit

Your mistakes are your personalized curriculum.

Bug2Brain turns your real coding mistakes, repeated patterns, and debugging struggles into a personalized learning experience — generating micro-exercises, spaced repetition flashcards, Bug Labs, and a visual mastery dashboard directly from your editor activity.

No chatbots. No generic courses. Just targeted practice that adapts to how you code.

Code → Insight → Practice → Mastery

✨ Key Features

  • 🛠 Real-Time Mistake Learning: Automatically detects and groups diagnostics, errors, and patterns from your coding sessions.
  • 🎯 Personalized Micro-Exercises: Adaptive multiple-choice, predict-output, fix-the-bug, and code-writing challenges based on your weakest concepts (with Socratic hints).
  • 🐞 Bug Lab: Interactive debugging challenges targeting your specific gaps; tracks your process (edits, hints, time).
  • 📇 Spaced Repetition Flashcards: Auto-generated revision cards using an SM-2 inspired algorithm.
  • 📊 Learning Dashboard: Beautiful VS Code webview with knowledge map, progress trends, streaks, mistake history, and week-over-week insights.
  • 💡 Explain Selected Code: Right-click any code for tiered explanations (beginner/visual/technical) — but only after you explain it yourself first.
  • 🔍 Codebase Learning Map: (Opt-in) Analyzes your workspace structure to suggest prerequisite concepts per area.
  • ⏰ Non-intrusive Interventions: Smart, cooldown-gated suggestions when learning gaps are detected.
  • 🧩 Teacher Mode (opt-in): Export anonymized aggregate reports for instructors; view classroom insights. Create/load assignments.
  • 🌐 Offline-First: Fully functional with zero setup using local rule-based AI. Optional integration with OpenAI, Azure OpenAI, Anthropic, or local models.
  • 🔒 Privacy-First Design: All data stays local. Strict sanitization. No telemetry by default. Teacher features require explicit opt-in.

📸 Screenshots

Dashboard Overview Dashboard

Bug Lab in Action Bug Lab

Learning Map Learning Map

🚀 Quick Start

  1. Install Bug2Brain from the VS Code Marketplace.
  2. Open any codebase (JavaScript, TypeScript, Python, Java, C/C++ supported best).
  3. Load demo data (Command Palette → Bug2Brain: Load Demo Data) to explore immediately.
  4. Click the status bar icon $(mortar-board) Bug2Brain or run Bug2Brain: Open Dashboard.
  5. Start with Practice My Weakest Concept or review flashcards.
  6. Right-click selected code for "Explain Selected Code" or "Explain It Yourself".

For AI features (optional):

  • Enable bug2brain.privacy.enableAIAnalysis
  • Configure your preferred provider and API key environment variable (see Configuration below).

📋 Available Commands

Command Description
Bug2Brain: Open Dashboard Main learning dashboard with all insights
Bug2Brain: Practice My Weakest Concept Jump straight into a 2-minute targeted exercise
Bug2Brain: Start Bug Lab Debugging challenge based on your gaps
Bug2Brain: Review Flashcards Spaced-repetition review session
Bug2Brain: Explain Selected Code Tiered explanations (right-click context menu)
Bug2Brain: Explain It Yourself Test your understanding first
Bug2Brain: Analyze Current Error Deep dive on the diagnostic at cursor
Bug2Brain: Analyze Workspace Build Codebase Learning Map
Bug2Brain: Export Anonymized Learning Report (Teacher Mode) Privacy-first report for instructors
Bug2Brain: View Classroom Insights (Teacher Mode) Aggregate class trends

⚙️ Configuration

Key settings (search for "Bug2Brain" in VS Code Settings):

  • AI Provider: mock (default, fully offline), openai-compatible, azure-openai, or anthropic
  • Privacy Controls: Enable AI analysis, control what code/error data can be sent (all sanitized)
  • Intervention: Enable/disable proactive suggestions, adjust cooldown and sensitivity
  • Storage: globalState (default) or sqlite for local database
  • Teacher Mode: Explicitly enabled for report export and classroom insights
  • Demo Mode: Populate with realistic sample data

Full configuration details, AI setup instructions, and privacy guarantees are in the GitHub repository.

🔒 Privacy & Security

  • 100% Local by Default: Your learning profile, history, and flashcards never leave your machine.
  • Strict Sanitization: All AI payloads go through redaction for secrets, keys, and sensitive patterns.
  • Opt-In Everything: AI, analytics, Teacher Mode, and interventions can be fully disabled.
  • Teacher Mode: Manual one-time exports only. No background collection. Aggregate-only reports. Validated untrusted input.
  • No Keystroke Logging, no full file reads unless explicitly selected, no env file parsing.

See the full Privacy section on GitHub.

🛠 Architecture & Testing

  • Pure business logic in core/, exercises/, revision/ (zero VS Code dependencies — fully unit testable).
  • 200+ unit tests including real sandbox grading, accessibility (axe-core), and edge cases.
  • Integration tests against real VS Code Extension Host.
  • Supports JS/TS/Python/Java/C/C++ with language-aware exercise generation.

Full technical documentation, architecture diagram, and known limitations are available in the GitHub repo.

Additional Documentation

  • CHANGELOG.md — Version history
  • CONTRIBUTING.md — How to contribute
  • LICENSE — MIT License

Roadmap

  • Enhanced multi-language support for Bug Lab sandboxing
  • Improved accessibility audit with screen reader testing
  • More exercise templates and concept coverage
  • Community-contributed exercise banks

Made with ❤️ by Anand Shah for the developer community


Your bugs are the best teacher. Bug2Brain just makes them an organized curriculum.

Full Technical Documentation

For in-depth architecture, detailed configuration guides, AI provider setup, complete privacy policy, Teacher Mode specifications, testing details, known limitations, and contribution guidelines, please see the GitHub repository.

  • Detailed Architecture and Core Concepts
  • Complete AI Configuration Guide
  • Privacy & Security deep-dive
  • Teacher Mode full specification
  • Comprehensive test suite documentation
  • CHANGELOG, CONTRIBUTING

Made with ❤️ by Anand Shah for the developer community

Turning real bugs into better developers.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft