$git clone https://github.com/jasonjmcghee/claude-debugs-for-you_aka Vibe Debugging_
| 1 | # <img src="./images/claude-debugs-for-you.png" width="64" height="64" alt="description" align="center"> Claude Debugs For You |
| 2 | |
| 3 | [](https://marketplace.visualstudio.com/items?itemName=JasonMcGhee.claude-debugs-for-you) |
| 4 | |
| 5 | _aka Vibe Debugging_ |
| 6 | |
| 7 | ### Enable Claude (or any other LLM) to interactively debug your code |
| 8 | |
| 9 | This is an [MCP](https://docs.anthropic.com/en/docs/build-with-claude/mcp) Server and VS Code extension which enables claude to interactively debug and evaluate expressions. |
| 10 | |
| 11 | That means it should also work with other models / clients etc. but I only demonstrate it with Claude Desktop and Continue here. |
| 12 | |
| 13 | It's language-agnostic, assuming debugger console support and valid launch.json for debugging in VSCode. |
| 14 | |
| 15 | ## Getting Started |
| 16 | |
| 17 | 1. Download the extension from [releases](https://github.com/jasonjmcghee/claude-debugs-for-you/releases/) or [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=JasonMcGhee.claude-debugs-for-you) |
| 18 | 2. Install the extension |
| 19 | - If using `.vsix` directly, go to the three dots in "Extensions" in VS Code and choose "Install from VSIX..." |
| 20 | 3. 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) |
| 21 | |
| 22 | <img width="314" alt="Screenshot 2025-03-22 at 9 51 22 PM" src="https://github.com/user-attachments/assets/2cd65e0d-4c1d-4fb6-b9ea-3995149b4043" /> |
| 23 | |
| 24 | You can click this status menu for the commands available |
| 25 | |
| 26 | <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" /> |
| 27 | |
| 28 | ### Follow one of the options below, depending on your setup |
| 29 | |
| 30 | <details> |
| 31 | <summary>If using stdio (classic, required for Claude Desktop)</summary> |
| 32 | |
| 33 | 4. Copy the stdio server path to your clipboard by searching vs code commands for "Copy MCP Debug Server stdio path to clipboard" |
| 34 | |
| 35 | 5. Paste the following (BUT UPDATE THE PATH TO THE COPIED ONE!) in your `claude_desktop_config.json` or edit accordingly if you use other MCP servers |
| 36 | |
| 37 | ``` |
| 38 | { |
| 39 | "mcpServers": { |
| 40 | "debug": { |
| 41 | "command": "node", |
| 42 | "args": [ |
| 43 | "/path/to/mcp-debug.js" |
| 44 | ] |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | ``` |
| 49 | |
| 50 | 6. Start Claude desktop (or other MCP client) |
| 51 | 1. Note: You may need to restart it, if it was already running. |
| 52 | 2. You can skip this step if using Continue/Cursor or other built-in to VS Code |
| 53 | </details> |
| 54 | |
| 55 | <details> |
| 56 | <summary>If using `/sse` (e.g. Cursor)</summary> |
| 57 | |
| 58 | 4. Retrieve the MCP server sse address by using the "Copy MCP Debug Server sse address to clipboard" command |
| 59 | 1. You can just write it out server URL of "http://localhost:4711/sse", or whatever port you setup in settings. |
| 60 | 5. Add it wherever you need to based on your client |
| 61 | 1. You may need to hit "refresh" depending on client: this is required in Cursor |
| 62 | 6. Start MCP client |
| 63 | 1. Note: You may need to restart it, if it was already running. |
| 64 | 2. You can skip this step if using Continue/Cursor or other built-in to VS Code |
| 65 | |
| 66 | </details> |
| 67 | |
| 68 | ### You're ready to debug! |
| 69 | |
| 70 | _[VS Code Debugging Documentation](https://code.visualstudio.com/Docs/editor/debugging)_ |
| 71 | |
| 72 | Open a project containing a `.vscode/launch.json` with the first configuration setup to debug a specific file with `${file}`. |
| 73 | |
| 74 | See [Run an Example](#run-an-example) below, and/or watch a demo video. |
| 75 | |
| 76 | ## Contributing |
| 77 | |
| 78 | Find bugs or have an idea that will improve this? Please open a pull request or log an issue. |
| 79 | |
| 80 | Does this readme suck? Help me improve it! |
| 81 | |
| 82 | ## Demo |
| 83 | |
| 84 | ### Using [Continue](https://github.com/continuedev/continue) |
| 85 | |
| 86 | It figures out the problem, and then suggests a fix, which we just click to apply |
| 87 | |
| 88 | https://github.com/user-attachments/assets/3a0a879d-2db7-4a3f-ab43-796c22a0f1ef |
| 89 | |
| 90 | <details> |
| 91 | <summary>How do I set this up with Continue? / Show MCP Configuration</summary> |
| 92 | |
| 93 | [Read the docs!](https://docs.continue.dev/customize/tools) |
| 94 | |
| 95 | Configuration: |
| 96 | |
| 97 | ```json |
| 98 | { |
| 99 | ... |
| 100 | "experimental": { |
| 101 | "mod |