DebugMCP
Gift your VS Code agent a real debugger: breakpoints, stepping, inspection.
Install / Use
claude mcp add microsoft -- npx -y github:microsoft/DebugMCPIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Skill content
View source on GitHubDebugMCP (MCP Server) - Empowering AI Agents with Operational Debugging Capabilities
Let AI agents debug your code inside VS Code - set breakpoints, step through execution, inspect variables, and evaluate expressions. Works with Codex, GitHub Copilot, GitHub Copilot CLI, Cline, Cursor, Windsurf, Roo Code, and any MCP-compatible assistant. Compatible with any VS Code supported coding language.
⭐ If you find DebugMCP useful, please star the repo on GitHub! It helps others discover the project and motivates continued development.
📢 Developers Notice: This extension is maintained by ozzafar@microsoft.com and orbarila@microsoft.com. We welcome feedback and contributions to help improve this extension.
<p align="center"> <img src="assets/DebugMCP.gif" width="800"> </p>🎬 Watch DebugMCP in action — your AI assistant autonomously sets breakpoints, steps through code, and inspects variables directly in VS Code.
✨ What's New
2.2
- Cross-agent
debug-liveskill install — the systematic debugging workflow ships as an Agent Skill and is now installed into the standard skills directories —~/.agents/skills/(the cross-agent location honored by skills-compatible harnesses, including VS Code agent mode) and~/.copilot/skills/when present — so it's discoverable everywhere instead of being copied next to each agent's config where nothing scans it (fixes #105, where VS Code never loaded the skill). The server also advertises MCPinstructionsand thestart_debuggingtool points at the skill for the full workflow. - Pause running programs — new
pause_executiontool interrupts a freely-running program and stops at its current location, even with no breakpoint set (great for busy loops and embedded/bare-metal targets), so you can then inspect state or step from there. - Robust debugging via the VS Code Testing API —
start_debuggingwith atestNameuses the VS Code Testing API to discover and launch the test, producing consistent breakpoint hits inside individual test cases across language test runners (pytest, Jest/Vitest, Java, .NET, Go, etc.).
🚀 Quick Install
Install from VS Code Marketplace or use the direct link: vscode:extension/ozzafar.debugmcpextension
Table of Contents
- Overview
- Features
- Installation
- Quick Start
- Supported AI Assistants
- Supported Languages
- Configuration
- FAQ
- Troubleshooting
- How It Works
- Contributing
- License
Overview
DebugMCP is an MCP server that gives AI coding agents full control over the VS Code debugger. Instead of reading logs or guessing, your AI assistant can autonomously set breakpoints, launch debug sessions, step through code line by line, inspect variable values, and evaluate expressions — just like a human developer would. It runs 100% locally, requires zero configuration, and works out of the box with any MCP-compatible AI assistant.
Features
🔧 Tools
| Tool | Description | Parameters |
|------|-------------|------------|
| start_debugging | Start a debug session for a source code file | fileFullPath (required)<br>workingDirectory (required)<br>testName (optional)<br>configurationName (optional) |
| stop_debugging | Stop the current debug session | None |
| step_over | Execute the next line (step over function calls) | None |
| step_into | Step into function calls | None |
| step_out | Step out of the current function | None |
| continue_execution | Continue until next breakpoint | None |
| pause_execution | Interrupt a freely-running program and stop at its current location (no breakpoint needed) | None |
| restart_debugging | Restart the current debug session | None |
| add_breakpoint | Add a breakpoint at a specific line (optionally conditional) | fileFullPath (required)<br>line (required, 1-based)<br>condition (optional) |
| add_logpoint | Add a logpoint that logs a message (instead of pausing) when a line is reached | fileFullPath (required)<br>line (required, 1-based)<br>logMessage (required, {expr} interpolated)<br>condition (optional) |
| remove_breakpoint | Remove a breakpoint from a specific line | fileFullPath (required)<br>line (required) |
| clear_all_breakpoints | Remove all breakpoints at once | None |
| list_breakpoints | List all active breakpoints | None |
| list_variable_names | List names and types of variables in scope, without reading any values | scope (optional: 'local', 'global', 'all') |
| get_variables_values | Get the values of specifically named variables at the current execution point | variableNames (required, e.g. ["user","response"])<br>scope (optional: 'local', 'global', 'all') |
| evaluate_expression | Evaluate an expression in debug context | expression (required) |
Note: The MCP server exposes tools for debugger actions, while the procedural workflow guidance (when to debug, how to structure a root-cause investigation, language-specific quirks) lives in the companion Agent Skill. Tool descriptions stay terse and behavioral; the extension installs the
debug-liveskill into the standard skills directories (~/.agents/skills/, plus~/.copilot/skills/when present) so skills-compatible harnesses load the full workflow on demand. The server also advertises MCPinstructionspointing agents at it before debugging.
🎯 Debugging Best Practices
DebugMCP follows systematic debugging practices for effective issue resolution:
- Start with Entry Points: Begin debugging at function entry points or main execution paths
- Follow the Execution Flow: Use step-by-step execution to understand code flow
- Root Cause Analysis: Don't stop at symptoms - find the underlying cause
🛡️ Security & Reliability
- Secure Communication: All MCP communications use secure protocols
- Local Operation: The MCP server runs 100% locally with no external communications and requires no credentials
- State Validation: Robust validation of debugging states and operations
Installation
Quick Install Options
Option 1: Direct Link (Fastest)
- Click this link: vscode:extension/ozzafar.debugmcpextension
- Or copy and paste in your browser:
vscode:extension/ozzafar.debugmcpextension
Option 2: VS Code Marketplace
- Visit: https://marketplace.visualstudio.com/items?itemName=ozzafar.debugmcpextension
- Click "Install"
Option 3: Within VS Code
- Open VSCode
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "DebugMCP"
- Click Install
- The extension automatically activates and registers as an MCP server
Verification
After installation, you should see:
- DebugMCP extension in your installed extensions
- MCP server automatically running on port 3001 (configurable)
- Debug tools available to connected AI assistants
📝 Note: No additional debugging rule instructions are needed - the extension works out of the box.
💡 Tip: Enable auto-approval for all debugmcp tools in your AI assistant to create seamless debugging workflows without constant approval interruptions.
Quick Start
- Install the extension (see Installation)
- Open your project in VSCode
- Ask your AI to debug - it can now set breakpoints, start debugging, and analyze your code!
Supported AI Assistants
DebugMCP works with any MCP-compatible AI assistant. It auto-detects and offers to register itself with:
| Assistant | Auto-Registration | Manual Config | |-----------|:-----------------:|:-------------:| | GitHub Copilot | ✅ | See config | | GitHub Copilot CLI | ✅ | See config | | Cline | ✅ | See config | | Cursor | ✅ | See config | | Codex | ✅ | See config | | Windsurf | ✅ | See config | | Roo Code | ✅ | See config | | Antigravity | ✅ | See config | | Any MCP-compatible assistant | — | See manual setup |
Supported Languages
DebugMCP supports debugging for the following languages with their respective VSCode extensions:
| Language | Extension Required | File Extensions | Status |
|----------|-------------------|-----------------|---------|
| Python | Python | .py | ✅ Fully Supported |
| JavaScript/TypeScript | Built-in / JS Debugger | .js, .ts, .jsx, .tsx | ✅ Fully Supported |
| Java | Extension Pack for Java | .java | ✅ Fully Supported |
| C/C++ | C/C++ | .c, .cpp, .cc | ✅ Fully Supported |
| Go | Go | .go | ✅ Fully Supported |
| Rust | rust-analyzer | .rs | ✅ Fully Supported |
| PHP | PHP Debug | .php | ✅ Fully Supported |
| Ruby | Ruby | .rb | ✅ Fully Supported |
| C#/.NET | C# | .cs, .csproj | ✅ Fully Supported |
Configuration
MCP Server Configuration (Recommended)
The extension runs an MCP server automatically. It will pop up a message to auto-register the MCP server in your AI assistant.
You can also trigger the registration manually via the Command Palette:
DebugMCP: Show Agent Selection Popup
Manual MCP Server Registration (Optional)
🔄 Auto-Migration: If you previously configured DebugMCP with SSE transport, the extension will automatically migrate your configuration to the new Streamable HTTP transport on activation.
Cline
Add to your Cline settings or cline_mcp_settings.json:
{
"mcpServers": {
"debugmcp": {
"type": "streamableHttp",
"url": "http://localhost:3001/mcp",
"description": "DebugMCP - AI-powered debugging assistant"
}
}
}
GitHub Copilot
Add to your VS Code settings (settings.json):
{
"mcp": {
"servers": {
"debugmcp": {
"type": "http",
"url": "http://localhost:3001/mcp",
"description": "DebugMCP - Multi-language debugging support"
}
}
}
}
GitHub Copilot CLI
Add to ~/.copilot/mcp-config.json (${COPILOT_HOME}/mcp-config.json if COPILOT_HOME is set):
{
"mcpServers": {
"debugmcp": {
"type": "http",
"url": "http://lo
Truncated for display — read the full file on GitHub.
Related Skills
caveman
107.1k🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
claude-mem
94.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
84.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
83.5kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
