Enable any LLM (e.g. Claude) to interactively debug any language for you via MCP and a VS Code Extension
aka Vibe Debugging
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.
.vsix
directly, go to the three dots in "Extensions" in VS Code and choose "Install from VSIX..."You can click this status menu for the commands available
<img width="510" alt="Screenshot 2025-03-22 at 9 59 22 PM" src="https://github.com/user-attachments/assets/54e339e3-81f8-4ef2-a201-6742aa2c97a8" />claude_desktop_config.json
or edit accordingly if you use other MCP servers{
"mcpServers": {
"debug": {
"command": "node",
"args": [
"/path/to/mcp-debug.js"
]
}
}
}
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.
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!
It 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
<details> <summary>How do I set this up with Continue? / Show MCP Configuration</summary>Configuration:
{
...
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "node",
"args": [
"/Users/jason/Library/Application Support/Code/User/globalStorage/jasonmcghee.claude-debugs-for-you/mcp-debug.js"
]
}
}
]
}
}
You'll also need to choose a model capable of using tools.
When the list of tools pops up, make sure to click "debug" in the list of your tools, and set it to be "Automatic".
If you are seeing MCP errors in continue, try disabling / re-enabling the continue plugin
</details>If helpful, this is what my configuration looks like! But it's nearly the same as 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
npm run install
and npm run compile
npm run compile
vsce package
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!
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".
<img width="395" alt="Screenshot 2025-03-22 at 10 08 52 PM" src="https://github.com/user-attachments/assets/2b6d1b61-a2c6-4447-8054-b4dd02a716e8" />jasonjmcghee/claude-debugs-for-you
January 17, 2025
July 7, 2025
TypeScript