Show HN: Claude Code for Visual Studio (native diff with accept/reject)(github.com)
github.com
Show HN: Claude Code for Visual Studio (native diff with accept/reject)
https://github.com/firish/claude_code_vs
12 comments
If anyone took the time to check it out, i would love your feedback on the following.
The Claude IDE protocol is undocumented. I reverse-engineered it from the official plugins' WebSocket traffic. For anyone who's built on an undocumented protocol like this, is there a reliable way to handle contract drift when there's no guaranteed spec to code against?
The Claude IDE protocol is undocumented. I reverse-engineered it from the official plugins' WebSocket traffic. For anyone who's built on an undocumented protocol like this, is there a reliable way to handle contract drift when there's no guaranteed spec to code against?
This is a cool project! I usually review docs/blogs/etc. as much as possible and brainstorm with an llm. I research to see if there are any other open source examples that I can also learn from. I find that this does pretty well. At the end of the day, after the implementation, I continue testing and that's where it gets interesting since I'll run into edge cases that creators of the original product already ran into and resolved and over time it helps make the software more robust as I use it and fix it myself.
The infra I built for this extension allowed me to add the next interesting part, the VS debugger. When you're paused at a breakpoint, Claude can read the call stack and locals, and with a toggle it can drive the debugger itself: set breakpoints, step, start and stop a session, and find a bug by running the code instead of reading it.
There's a short walkthrough in the README where it catches a bug that never shows up in the output, by watching a counter fail to reset as it steps through a loop.
There's a short walkthrough in the README where it catches a bug that never shows up in the output, by watching a counter fail to reset as it steps through a loop.
VS Code does actually already have this. I use it in Antigravity IDE.
https://marketplace.visualstudio.com/items?itemName=anthropi...
https://marketplace.visualstudio.com/items?itemName=anthropi...
This is for Visual Studio (the full IDE), not VS Code. VS Code and JetBrains both have the official Anthropic extension already. Visual Studio was the gap, since the official plugin doesn't cover it, so that's what this fill.
The biggest features are the ability to view diffs in the IDE instead of the CLI and sharing Roslyn analyzer compiler errors and warnings to the CLI with file and line/char span information to help with debugging.
The biggest features are the ability to view diffs in the IDE instead of the CLI and sharing Roslyn analyzer compiler errors and warnings to the CLI with file and line/char span information to help with debugging.
This person is talking about Visual Studio, not VS Code
Will definitely try this soonish
Thanks a ton. Looking forward to any feedback honestly!
It implements the same protocol the official plugins use, so the Claude CLI connects to it automatically. You don't configure anything, just install the extension and click Launch.
The main thing it adds over running Claude in a terminal is that edits open in Visual Studio's native diff viewer instead of auto-applying or prompting you in the terminal. You click Accept or Reject right there. You can also reject with a reason, and Claude will take another pass.
It also shares your compiler errors (C# and C++) and your current selection with the CLI automatically, so Claude has context without you having to copy-paste anything.
A few other things: - There's a dockable panel with connection status and token/cost stats for the session - A "run wild" toggle to auto-accept edits without opening the diff Works with the existing claude CLI, no model calls of its own
Marketplace: https://marketplace.visualstudio.com/items?itemName=firish.b...
GitHub: https://github.com/firish/claude_code_vs