ChatGPT for Visual Studio: A Practical Development Workflow
Visual Studio does not have a native ChatGPT integration from OpenAI. Here is how developers actually use AI assistance alongside Visual Studio, and how to keep project context across sessions.
Updated 5 min read
Visual Studio does not have a native ChatGPT integration from OpenAI. There is no official plugin or extension in the Visual Studio Marketplace from OpenAI that adds a ChatGPT panel or inline suggestions to the IDE. What developers do instead is use ChatGPT in a browser or desktop app alongside Visual Studio, or use GitHub Copilot, which does have a native Visual Studio extension.
The distinction matters because workflows that assume a native integration, such as selecting code in the editor and sending it to ChatGPT with one click, require a third-party extension or a manual copy-paste step. Understanding your actual options helps you set up a realistic workflow. Tools like fenbs keep the debugging lessons and project decisions that accumulate across sessions outside any specific tool, so they are available regardless of how you connect.
For AI features built directly into the Visual Studio editor, the AI in Visual Studio guide covers the options. For GitHub Copilot's Visual Studio integration specifically, the GitHub Copilot in Visual Studio guide covers setup and usage.
The side-by-side workflow
The simplest approach is to run ChatGPT in a browser window or desktop app alongside Visual Studio. You select the relevant code in Visual Studio, copy it, paste it into ChatGPT with a description of the problem, and then copy the suggestion back to Visual Studio to review and test.
This works well for focused tasks: explaining a compiler error, reviewing a function, suggesting a refactor for a specific class. It works less well for tasks that require understanding many files at once, since you are manually deciding what context to include. Giving ChatGPT a brief description of the project, the relevant framework, and any constraints alongside the code improves the quality of suggestions.
Review every suggestion before applying it. Open the target file in Visual Studio, apply the change, and run the relevant tests. A suggestion that looks correct in isolation may break an integration test, violate a pattern the project uses, or introduce a dependency that conflicts with an existing one.
GitHub Copilot for Visual Studio
GitHub Copilot has a native Visual Studio extension that provides inline completions, a chat panel for asking questions about your code, and the ability to select a block of code and ask Copilot to explain or refactor it. It is available for Visual Studio 2022 and later and requires a Copilot subscription.
Copilot's chat mode in Visual Studio can receive your selected code as context automatically, without a manual copy step. This makes it faster for the side-by-side workflow described above. Copilot is not ChatGPT directly, but it is built on OpenAI models and provides similar capabilities for coding tasks. The Copilot vs ChatGPT comparison explains the differences in access model and typical use cases.
Copilot Studio and Visual Studio
Microsoft's Copilot Studio is a separate product for building custom AI agents and automations, not a coding assistant for Visual Studio. The name similarity causes confusion. Copilot Studio does not add AI coding features to Visual Studio; it is a no-code/low-code platform for building copilot agents for business processes.
Using Codex CLI from the Visual Studio terminal
Visual Studio includes an integrated terminal (View, Terminal). OpenAI's Codex CLI runs in any terminal and can read your project directory, suggest code changes, and apply them. This gives you a more capable AI coding session than copy-paste, since Codex CLI can read multiple files and understand the project structure.
Run Codex CLI in the Visual Studio terminal, point it at your project directory, and give it instructions in plain language. Review any file it modifies in the Visual Studio editor, run your test suite, and check the diff carefully before committing. The ChatGPT Codex guide covers Codex CLI setup.
Keeping debugging lessons and project decisions
A consistent problem with using any AI tool for Visual Studio development is that sessions are ephemeral. You spend time in one session working out that a particular debugging approach does not work for your project's async patterns. That knowledge lives in a closed browser tab by the next morning.
Writing down hard-won lessons means the next session, and the next developer, starts from that knowledge rather than rediscovering it. This applies to debugging patterns, dependency choices, and architectural decisions the team has worked out together.
Keep debugging lessons and project decisions across sessions
When a coding session with ChatGPT or Copilot produces a useful finding, such as a debugging approach that works or a dependency that caused a problem, save it as a lesson or a decision in fenbs. Connect a supported AI app from Integrations and it reads these lessons before similar work, instead of starting from the same assumption the previous session started from.
Create a free accountFree for one person · No credit card · Works with Claude, ChatGPT, Cursor and more
How to do this with fenbs
- Create a free account and add your Visual Studio project.
- Write the key project constraints as Decisions and rules: framework version, build configuration, patterns the team has agreed on, any known problem areas.
- When a debugging session produces a useful finding, add it as a lesson: what the problem was, what the solution was, and what to check first next time.
- Connect a supported coding assistant from Integrations. At the start of each session, ask it to read the project context: decisions and lessons come first.
- When a decision changes, update it in fenbs so every future session, regardless of which tool handles it, starts from the current answer.