Claude Debugger
aka Vibe Debugging
Enable Claude (or any other LLM) to interactively debug your code
This is an MCP Server and VS Code extension which enables claude to interactively debug and evaluate expressions.
That means it should also work with other models / clients etc. but I only demonstrate it with Claude Desktop and Continue here.
It's language-agnostic, assuming debugger console support and valid launch.json for debugging in VSCode.
Getting Started
- Download the extension from releases or VS Code Marketplace
- Install the extension
- If using
.vsix
directly, go to the three dots in "Extensions" in VS Code and choose "Install from VSIX..."
- You will see a new status menu item "Claude Debugs For You" which shows if it is running properly (check) or failed to startup (x)
You can click this status menu for the commands available
Follow one of the options below, depending on your setup
You're ready to debug!
VS Code Debugging Documentation
Open a project containing a .vscode/launch.json
with the first configuration setup to debug a specific file with ${file}
.
See Run an Example below, and/or watch a demo video.
Contributing
Find bugs or have an idea that will improve this? Please open a pull request or log an issue.
Does this readme suck? Help me improve it!
Demo
Continue
UsingIt figures out the problem, and then suggests a fix, which we just click to apply
https://github.com/user-attachments/assets/3a0a879d-2db7-4a3f-ab43-796c22a0f1ef
If helpful, this is what my configuration looks like! But it's nearly the same as Claude Desktop.
Using Claude Desktop
In this example, I made it intentionally very cautious (make no assumptions etc - same prompt as below) but you can ask it to do whatever.
https://github.com/user-attachments/assets/ef6085f7-11a2-4eea-bb60-b5a54873b5d5
Developing
- Clone / Open this repo with VS Code
- Run
npm run install
andnpm run compile
- Hit "run" which will open a new VSCode
- Otherwise same as "Getting Started applies"
- To rebuild,
npm run compile
Package
vsce package
Run an Example
Open examples/python
in a VS Code window
Enter the prompt:
i am building `longest_substring_with_k_distinct` and for some reason it's not working quite right. can you debug it step by step using breakpoints and evaluating expressions to figure out where it goes wrong? make sure to use the debug tool to get access and debug! don't make any guesses as to the problem up front. DEBUG!
Other things worth mentioning
When you start multiple vs code windows, you'll see a pop-up. You can gracefully hand-off "Claude Debugs For You" between windows.
You can also disable autostart. Then you'll just need to click the status menu and select "Start Server".
Short list of ideas
- It should use ripgrep to find what you ask for, rather than list files + get file content.
- Add support for conditional breakpoints
- Add "fix" tool by allowing MCP to insert a CodeLens or "auto fix" suggestion so the user can choose to apply a recommended change or not.
- Your idea here!