AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

DebugMCP

mcp-microsoft-debugmcp · by microsoft

Gift your VS Code agent a real debugger: breakpoints, stepping, inspection.

No reviews yet
0 installs
23 views
0.0% view→install

Install

$ agentstack add mcp-microsoft-debugmcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-microsoft-debugmcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of DebugMCP? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

DebugMCP (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.

[](https://opensource.org/licenses/MIT) [](https://code.visualstudio.com/) [](https://github.com/microsoft/DebugMCP) [](https://marketplace.visualstudio.com/items?itemName=ozzafar.debugmcpextension)

> ⭐ 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](mailto:ozzafar@microsoft.com) and [orbarila@microsoft.com](mailto:orbarila@microsoft.com). We welcome feedback and contributions to help improve this extension.

> 🎬 Watch DebugMCP in action — your AI assistant autonomously sets breakpoints, steps through code, and inspects variables directly in VS Code.

✨ What's New in 2.0.0

  • /debug-live Agent Skill — DebugMCP now ships a companion [Agent Skill](./skills/debug-live/SKILL.md) that is auto-installed into each configured harness's personal skills directory (e.g. ~/.copilot/skills/debug-live/). Invoke it with /debug-live in supporting agents to load the systematic debugging workflow and trigger DebugMCP tools with the right context.
  • Robust debugging via the VS Code Testing APIstart_debugging with a testName now uses the VS Code Testing API to discover and launch the test, replacing the previous best-effort path. This works reliably across language test runners that integrate with the Testing API (pytest, Jest/Vitest, Java, .NET, Go, etc.) and produces consistent breakpoint hits inside individual test cases.

🚀 Quick Install

Install from VS Code Marketplace or use the direct link: vscode:extension/ozzafar.debugmcpextension

Table of Contents

  • [Overview](#overview)
  • [Features](#features)
  • [Installation](#installation)
  • [Quick Start](#quick-start)
  • [Supported AI Assistants](#supported-ai-assistants)
  • [Supported Languages](#supported-languages)
  • [Configuration](#configuration)
  • [FAQ](#faq)
  • [Troubleshooting](#troubleshooting)
  • [How It Works](#how-it-works)
  • [Contributing](#contributing)
  • [License](#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 | |------|-------------|------------| | startdebugging | Start a debug session for a source code file | fileFullPath (required)workingDirectory (required)testName (optional)configurationName (optional) | | stopdebugging | Stop the current debug session | None | | stepover | Execute the next line (step over function calls) | None | | stepinto | Step into function calls | None | | stepout | Step out of the current function | None | | continueexecution | Continue until next breakpoint | None | | restartdebugging | Restart the current debug session | None | | addbreakpoint | Add a breakpoint at a specific line (optionally conditional) | fileFullPath (required)lineContent (required)condition (optional) | | removebreakpoint | Remove a breakpoint from a specific line | fileFullPath (required)line (required) | | clearallbreakpoints | Remove all breakpoints at once | None | | listbreakpoints | List all active breakpoints | None | | getvariablesvalues | Get variables and their values at current execution point | scope (optional: 'local', 'global', 'all') | | evaluate_expression | Evaluate an expression in debug context | expression (required) |

> Note: The MCP server intentionally exposes tools only — no procedural > instructions, no documentation resources. Workflow guidance (when to debug, how to > structure a root-cause investigation, language-specific quirks) lives in the companion > [DebugMCP Agent Skill](./skills/debug-live/SKILL.md) so it can be loaded into an > agent's prompt context independently of the MCP capability surface.

🎯 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](vscode:extension/ozzafar.debugmcpextension)
  • Or copy and paste in your browser: vscode:extension/ozzafar.debugmcpextension

Option 2: VS Code Marketplace

Option 3: Within VS Code

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "DebugMCP"
  4. Click Install
  5. 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

  1. Install the extension (see [Installation](#installation))
  2. Open your project in VSCode
  3. 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) | | GitHub Copilot CLI | ✅ | [See config](#github-copilot-cli) | | Cline | ✅ | [See config](#cline) | | Cursor | ✅ | [See config](#cursor) | | Codex | ✅ | [See config](#codex) | | Windsurf | ✅ | [See config](#windsurf) | | Roo Code | ✅ | [See config](#roo-code) | | Antigravity | ✅ | [See config](#antigravity) | | Any MCP-compatible assistant | — | [See manual setup](#manual-mcp-server-registration-optional) |

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://localhost:3001/mcp",
      "tools": ["*"]
    }
  }
}
Cursor

Add to Cursor's MCP settings:

{
  "mcpServers": {
    "debugmcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3001/mcp",
      "description": "DebugMCP - Debugging tools for AI assistants"
    }
  }
}
Codex

Register DebugMCP with Codex:

codex mcp add debugmcp --url http://localhost:3001/mcp

Or add the equivalent configuration to ~/.codex/config.toml (${CODEX_HOME}/config.toml if CODEX_HOME is set):

[mcp_servers.debugmcp]
url = "http://localhost:3001/mcp"
Windsurf

Add to Windsurf's MCP settings (~/.windsurf/mcp_settings.json or workspace .windsurf/mcp_settings.json):

{
  "mcpServers": {
    "debugmcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3001/mcp",
      "description": "DebugMCP - Debugging tools for AI assistants"
    }
  }
}
Roo Code

Add to Roo Code's MCP settings:

{
  "mcpServers": {
    "debugmcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3001/mcp",
      "description": "DebugMCP - Debugging tools for AI assistants"
    }
  }
}
Antigravity

Add to Antigravity's MCP settings:

{
  "mcpServers": {
    "debugmcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3001/mcp",
      "description": "DebugMCP - Debugging tools for AI assistants"
    }
  }
}

Extension Settings

Configure DebugMCP behavior in VSCode settings:

{
  "debugmcp.serverPort": 3001,
  "debugmcp.timeoutInSeconds": 180,
  "debugmcp.bindHost": ["127.0.0.1", "::1"]
}

| Setting | Default | Description | |---------|---------|-------------| | debugmcp.serverPort | 3001 | Port number for the MCP server | | debugmcp.timeoutInSeconds | 180 | Timeout for debugging operations | | debugmcp.bindHost | ["127.0.0.1", "::1"] | Network interface(s) the HTTP server binds to. Accepts a string or array of strings. See [Security model](#security-model) before changing. |

Security model

DebugMCP exposes powerful debugger primitives (evaluate_expression, start_debugging, …) over an unauthenticated local HTTP endpoint. To keep that surface safe, the server enforces two controls:

  1. Loopback-only bind. The HTTP server binds to the IPv4 and IPv6 loopback addresses (127.0.0.1 and ::1) by default, so other hosts on your network cannot reach http://:3001/mcp. Binding both families ensures clients that resolve localhost to either family connect successfully. The debugmcp.bindHost setting (string or array of strings) lets you opt into a different interface (for example, when forwarding the port into a remote container), but doing so exposes the unauthenticated debugger to anything that can route to that address — do not point it at 0.0.0.0 or a LAN address on an untrusted network.
  2. Host / Origin header validation. Every request must carry a Host header naming a loopback address (localhost, 127.0.0.1, or [::1]); any port suffix in the Host must also match the server's listening port. Requests with any other Host — including those that arrive via DNS rebinding from a malicious webpage — are rejected with HTTP 403. The same loopback check is applied to the Origin header when present.

FAQ

Which AI assistants are supported?

DebugMCP works with any MCP-compatible AI assistant, including GitHub Copilot, GitHub Copilot CLI, Cline, Cursor, Codex, Windsurf, Roo Code, Antigravity, and others. If your assistant supports the Model Context Protocol, it can use DebugMCP.

Does it work with VS Code Remote SSH / Codespaces / WSL?

Yes. DebugMCP runs as a VS Code extension with extensionKind: workspace, so it activates in the remote environment where your code lives. The MCP server runs on localhost within that remote context.

Do I need to configure launch.json?

No. DebugMCP automatically generates appropriate debug configurations based on the file's language/extension. If you have a launch.json, it will automatically pick the most relevant configuration.

Is my code sent to any external service?

No. DebugMCP runs 100% locally. The MCP server runs on localhost, and no code, variables, or debug data is sent to any external service. The AI assistant communicates with the MCP server entirely within your local machine.

What if port 3001 is already in use?

Change the port in VS Code settings: "debugmcp.serverPort": 3002 (or any available port). Then update your AI assistant's MCP configuration to use the new port.

Can I debug unit tests?

Yes. Pass the testName parameter to start_debugging to debug a specific test method. DebugMCP will configure the debug session to run and pause at breakpoints within that test.

Why is my AI assistant not using the debug tools?

Make sure DebugMCP is registered in your AI assistant's MCP settings. The extension should auto-detect and offer to register itself. If not, see the [Manual MCP Server Registration](#manual-mcp-server-registration-optional) section. Also enable auto-approval for DebugMCP tools for a smoother workflow.

Does it support ASP.NET / .csproj projects?

Yes. DebugMCP supports .cs files and .csproj project files for C#/.NET debugging, including ASP.NET applications.

Troubleshooting

Common Issues

MCP Server Not Starting
  • Symptom: AI assistant can't connect to DebugMCP
  • Solution:
  • Check if port 3001 is available
  • Restart VSCode
  • Verify extension is installed and activated
Debug Session Not Stopping at Breakpoints
  • Symptom: Br

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.