Understand unfamiliar code faster, directly inside VS Code.
AskWhy is a VS Code extension that explains selected code in detail — not only what it does, but why it may exist, what it affects, possible risks, improvements, and Git history context.
✨ Features
🔍 Explain Any Selected Code
Select code → right click → Why This Code Is Here?
AskWhy gives you:
- ✅ What the code does
- 🧠 Why it might have been written
- 🧩 Line-by-line explanation
- 📥 Inputs and outputs
- ⚠️ Side effects
- 🐛 Possible bugs and risks
- 🧾 Git history insight
- 👶 Simple “Explain like I’m 10”
- 🚀 Improvement suggestions
🧾 Git History Insights
If the file is inside a Git repository, AskWhy can show:
- Who last changed the file
- When it was changed
- Commit message
- Selected line history
This helps you understand not just the code, but the reason behind the code.
🎯 Why Use AskWhy?
AskWhy is useful when you:
- Join a new project and don’t understand old code
- Work with large codebases
- Review someone else’s code
- Debug unfamiliar logic
- Want to understand side effects before editing
- Need quick code explanation without switching tabs
- Want Git context while reading code
Instead of asking:
“What is this doing?”
AskWhy helps answer:
“Why does this exist, and what happens if I change it?”
🚀 How to Use
- Open any project in VS Code
- Open a code file
- Select the code you want to understand
- Right-click on the selected code
- Click:
Why This Code Is Here?