Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Code On The FlyNew to Visual Studio Code? Get it now.
Code On The Fly

Code On The Fly

Nabin Bhandari

| (0) | Free
Checks Python and JavaScript files on save and has AI explain the error and the fix: local Ollama, OpenAI, or any OpenAI-compatible API.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code On The Fly

Save a Python or JavaScript file, and Code On The Fly checks it right away. When the save breaks something, it shows the error, underlines the line, and has an AI explain what went wrong and how to fix it.

The AI compares the last working version of your file with the broken one and the error, so it explains what your change broke, not just what the error message says.

Features

  • Checks on save: Python with Ruff, JavaScript with node --check. Errors appear as red underlines and in the Code On The Fly panel in the Explorer sidebar.
  • AI explanation: what went wrong, the exact lines, the fixed code, and a tip to avoid it next time.
  • Pick your AI: a local model with Ollama (free, private, the default), OpenAI, or any OpenAI-compatible API such as OpenRouter, Groq, Gemini, DeepSeek, Mistral or LM Studio.
  • Views: the full explanation, only the error, only the line number, or just "broken line → fixed line".
  • Optional punch line: enter a theme like Halloween or exam week, and each explanation ends with a short sarcastic one-liner about the bug. Off by default; it never changes the explanation.

Requirements

  1. Python 3.10 or newer (python.org). On first start, the extension creates its own private Python environment and installs what it needs. This takes under a minute, once. Your project's Python is not touched.
  2. Node.js, only if you want JavaScript files checked.
  3. An AI provider (or turn AI off and keep the error checks):
    • Ollama: install Ollama, then run ollama pull gemma4:12b, or pick any model you already have.
    • OpenAI or another API: have an API key ready.

Getting started

  1. Install the extension and open a project folder.
  2. Open the Code On The Fly panel in the Explorer sidebar.
  3. Click the ⚙ button in the panel title → AI provider…, and follow the steps. API keys are stored in VS Code's secure storage, never in settings files.
  4. Save a .py or .js file with a mistake in it.

Library folders such as node_modules, .venv, dist and build are never checked.

Settings

Most settings are in the panel's ⚙ menu. All of them are also under Settings → Extensions → Code On The Fly.

Setting Default What it does
codeOnTheFly.provider ollama ollama, openai or custom (any OpenAI-compatible API).
codeOnTheFly.model gemma4:12b Ollama model.
codeOnTheFly.openaiModel gpt-4o-mini OpenAI model.
codeOnTheFly.customBaseUrl / customModel Address and model of a custom API.
codeOnTheFly.enableAi true Turn AI explanations on or off. Error checks keep working.
codeOnTheFly.viewMode default What the panel shows for an error.
codeOnTheFly.fontSize 12 Panel text size.
codeOnTheFly.roastTheme (empty) Theme for the punch line. Empty means no punch line.
codeOnTheFly.watchFolder . Folder to check, relative to the workspace.
codeOnTheFly.pythonPath (empty) Use your own Python instead of the extension's environment. It needs the packages from the extension's requirements.txt.

Privacy

With Ollama, your code never leaves your computer. With OpenAI or another online API, the file you saved, its last working version and the error are sent to that service each time a save fails.

Troubleshooting

Open View → Output and pick Code On The Fly to see the log. Code On The Fly: Restart Server in the Command Palette restarts the checks after you fix a setup problem.

License

MIT

Author

Made by Nabin Bhandari.

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