/ Directory / Playground / DebugMCP
● Official microsoft ⚡ Instant

DebugMCP

by microsoft · microsoft/DebugMCP

Microsoft's DebugMCP gives Claude full control of the VS Code debugger — breakpoints, stepping, variable inspection across 9 languages.

DebugMCP is an official Microsoft VS Code extension that exposes the editor's debugger as MCP tools. Your AI assistant can autonomously launch debug sessions, set breakpoints by line content (no fragile line numbers), step through execution, and inspect variables — across Python, TypeScript, Java, C#, C++, Go, Rust, PHP, and Ruby. Local-only, no external calls, runs on port 3001.

Why use it

Key features

Live Demo

What it looks like in practice

debug-mcp-microsoft.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "debug-mcp-microsoft": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:3001/mcp"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "debug-mcp-microsoft": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:3001/mcp"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "debug-mcp-microsoft": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:3001/mcp"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "debug-mcp-microsoft": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:3001/mcp"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "debug-mcp-microsoft",
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:3001/mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "debug-mcp-microsoft": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "http://localhost:3001/mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add debug-mcp-microsoft -- npx -y mcp-remote http://localhost:3001/mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use DebugMCP

Have Claude step through a failing test instead of reading prints

👤 Backend / app devs ⏱ ~15 min beginner

When to use: A test fails with no clear stack — print debugging will take forever.

Prerequisites
  • DebugMCP installed in VS Code — Marketplace → ozzafar.debugmcpextension
  • Language debug extension (e.g., Python for .py) — Auto-prompted by VS Code on first run
Flow
  1. Set up
    Use debugmcp. Add a breakpoint on the line assert result == expected in tests/test_orders.py.✓ Copied
    → Breakpoint reported as set; line content matched
  2. Run
    Start debugging tests/test_orders.py with the failing test.✓ Copied
    → Session paused at breakpoint
  3. Inspect
    Show me all local variables. What's result actually contain?✓ Copied
    → Variable dump with concrete values
  4. Step + diagnose
    Step into the function that built result. Tell me where it diverged from expected.✓ Copied
    → Code-anchored root cause

Outcome: Bug located by stepping, not guessing — minutes instead of an hour.

Pitfalls
  • Breakpoint by line number drifts after edits — Use line content matching (DebugMCP supports this natively)
Combine with: filesystem

Pin down a heisenbug with conditional breakpoints

👤 Devs facing intermittent bugs ⏱ ~25 min intermediate

When to use: Bug only repros under specific input — you need to halt only on that case.

Flow
  1. Conditional break
    Add a breakpoint at the process(order) call that fires only when order.id starts with 'EXP-'.✓ Copied
    → Conditional breakpoint installed
  2. Drive repro
    Run the integration suite. When we stop, evaluate the order DTO and the request headers.✓ Copied
    → Exact failing input captured

Outcome: Heisenbug becomes a regular bug.

Pitfalls
  • Conditional eval slows the loop — Narrow the condition; keep it pure (no side effects)

Use the debugger as documentation for unfamiliar code

👤 New hires onboarding to a service ⏱ ~30 min beginner

When to use: You inherited a service and the data flow is opaque.

Flow
  1. Trace entry
    Set a breakpoint at the HTTP handler for /orders. Run a sample request and step through every call until response is returned. Narrate as you go.✓ Copied
    → Step-by-step trace with file:line annotations

Outcome: A behavioral map of the service that no diagram captured.

Pitfalls
  • Trace gets too deep — Use step_over for known-boring frames, step_into only the interesting ones

Combinations

Pair with other MCPs for X10 leverage

debug-mcp-microsoft + filesystem

Read source while stepping to decide next move

Step into the call. While paused, show me the surrounding function via filesystem.✓ Copied
debug-mcp-microsoft + github

Open a PR with the fix you just verified via the debugger

We confirmed the bug. Open a PR with the fix and reference the debug session in the description.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
start_debugging fileFullPath, workingDirectory, testName?, configurationName? Begin a debug session free
add_breakpoint fileFullPath, lineContent Mark a halt point by code content free
step_over (none) Advance one source line free
step_into (none) Descend into the called function free
get_variables_values scope: 'local'|'global'|'all' Inspect state at the current pause point free
evaluate_expression expression: str Test hypotheses without re-running free
list_breakpoints (none) Audit current trap set free

Cost & Limits

What this costs to run

API quota
Local — no quota
Tokens per call
100–500 per debug action
Monetary
Free (MIT)
Tip
Stepping is cheaper than print-debug-loop iterations; trade tokens for faster diagnosis

Security

Permissions, secrets, blast radius

Minimum scopes: Local file read for source mapping
Credential storage: None — no creds needed
Data egress: None — fully local
Never grant: Network exposure of port 3001

Troubleshooting

Common errors and fixes

MCP server not detected after install

Restart VS Code; ensure extension is enabled and port 3001 is free

Verify: curl http://localhost:3001/mcp
Language not supported

Install the matching VS Code language debug extension first (e.g., ms-python.python for Python)

Verify: Run debug manually from VS Code UI to confirm
Breakpoint never hits

Source map mismatch — confirm you're debugging the same artifact you edited

Verify: Check launch.json `program` path

Alternatives

DebugMCP vs others

AlternativeWhen to use it insteadTradeoff
Print / log statementsQuick one-off, no IDE attachedCheap but slow to iterate; pollutes the codebase
Language-specific REPLYou want post-mortem inspection onlyNo live stepping; less rich than full debugger

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills