← Back to directory
D

DebugMCP

Official
Gift your VS Code agent a real debugger: breakpoints, stepping, inspection.
GitHub source repository ↗
★ 498 Stars Category · Dev Tools Very popular
62FMRS · C

DebugMCP is a Microsoft-maintained VS Code extension and MCP server that hands real debugger capabilities (breakpoints, stepping, variable inspection, expression evaluation) to AI coding agents. It runs entirely locally, works out of the box, supports major MCP clients and many languages, and exposes 16 debugging tools while limiting its attack surface with loopback-only binding, Host/Origin validation, least-privilege variable reads, and secret redaction. It suits developers doing interactive, agent-driven debugging in VS Code; it is not intended for non-VS Code environments, networked debug endpoints, or cloud-hosted debugging.

Reliability
9/20
Security and permissions
13/20
Maintenance
12/20
Documentation
15/20
Setup experience
13/20
Read the FMRS scoring method →

DebugMCP is a Microsoft-maintained VS Code extension that also runs as an MCP server, giving AI coding agents direct control over the VS Code debugger. Agents can autonomously set breakpoints, launch debug sessions, step through code line by line, inspect variable values, and evaluate expressions, just like a human developer. It runs 100% locally, requires zero configuration, works out of the box with any MCP-compatible assistant, and supports any VS Code supported coding language (Python, JavaScript/TypeScript, Java, C/C++, Go, Rust, PHP, Ruby, C#/.NET). The server listens over Streamable HTTP on loopback (default port 3001), auto-detects and offers to register itself with GitHub Copilot, GitHub Copilot CLI, Cline, Cursor, Codex, Windsurf, Roo Code, Antigravity, and other clients, and can also be configured manually. Security controls include loopback-only binding, Host/Origin header validation, least-privilege variable inspection, and secret redaction, with no debug data leaving the machine. Procedural debugging guidance ships as the companion debug-live Agent Skill, installed into standard skills directories.

Tools

start_debugging
Start a debug session for a source code file (optional working directory, test name, configuration name)
stop_debugging
Stop the current debug session
step_over
Execute the next line, stepping over function calls
step_into
Step into function calls
step_out
Step out of the current function
continue_execution
Continue until the next breakpoint
pause_execution
Interrupt a freely-running program and stop at its current location, no breakpoint needed
restart_debugging
Restart the current debug session
add_breakpoint
Add a breakpoint at a specific line, optionally conditional
add_logpoint
Add a logpoint that logs a message instead of pausing when the line is reached ({expr} interpolation)
remove_breakpoint
Remove a breakpoint from a specific line
clear_all_breakpoints
Remove all breakpoints at once
list_breakpoints
List all active breakpoints
list_variable_names
List names and types of variables in scope without reading any values
get_variables_values
Get values of specifically named variables at the current execution point (max 50, no wildcards)
evaluate_expression
Evaluate an expression in debug context; expandable children list name and type only

Setup

  1. Install the DebugMCP extension in VS Code: search "DebugMCP" in the VS Code Marketplace, or use the direct link vscode:extension/ozzafar.debugmcpextension, or install it from the Extensions view. 2. The extension activates automatically and starts the MCP server on local port 3001. 3. A popup offers to auto-register the MCP server with your AI assistant; you can also run "DebugMCP: Show Agent Selection Popup" from the Command Palette. 4. For manual setup, add a Streamable HTTP server pointing at http://localhost:3001/mcp in your assistant's MCP settings (per-client formats are documented in the README). 5. Enabling auto-approval for all debugmcp tools is recommended for a seamless debugging workflow. 6. Make sure the VS Code debugging extension for your target language is installed (e.g. Python, C#, etc.).
claude_desktop_config.json
{
  "mcpServers": {
    "debugmcp": {
      "type": "streamableHttp",
      "url": "http://localhost:3001/mcp",
      "description": "DebugMCP - Debugging tools for AI assistants"
    }
  }
}

Fit and risk

Best for

  • Developers using AI coding agents in VS Code who want real debugging capability
  • Scenarios needing automated root-cause analysis instead of reading logs
  • Users working in VS Code Remote SSH, Codespaces, or WSL remote environments
  • Teams wanting one unified debugging tool across many programming languages

Not for

  • Users who do not use VS Code or any MCP-compatible AI assistant
  • Scenarios that need to expose the debugging service to other machines on a network (loopback-only by default; rebinding carries unauthenticated risk)
  • Users who will not install the corresponding VS Code debugger extension for their language
  • Users expecting an externally hosted or cloud-based debugging service (the extension runs locally only)

Required permissions

  • Listen on an HTTP port on loopback addresses (127.0.0.1 and ::1), default 3001, configurable via debugmcp.serverPort
  • Read the source files being debugged and any .vscode/launch.json configuration in the project
  • Call the VS Code Debug API to start/stop debug sessions, set breakpoints, and step through code
  • Read variable values in debug context and evaluate expressions (with secret redaction applied)
  • Install the debug-live skill file into standard skills directories (~/.agents/skills/, plus ~/.copilot/skills/ when present)

Risks and side effects

  • The MCP endpoint is unauthenticated by default, so any local process that can reach the loopback port can call powerful debugger primitives such as evaluate_expression
  • Changing debugmcp.bindHost to 0.0.0.0 or a LAN address exposes the unauthenticated debugger to anything that can route to that address
  • Evaluating expressions through the debugger can have side effects depending on the debugged program, and agent auto-approval reduces human confirmation
  • Variable redaction relies on names and credential shapes, so it can miss secrets; null-ish values are deliberately not redacted, which may leak sensitive data in edge cases
  • The extension modifies AI assistant MCP registration configuration (with a prompt)

Troubleshooting

  1. AI assistant cannot connect: check whether port 3001 is in use, switch to another port and update the client config; restart VS Code and confirm the extension is activated
  2. Breakpoints are not hit: verify the correct file and line number, and that the VS Code debugger extension for that language is installed
  3. The debugged window takes focus with multiple VS Code windows open: disable debug.focusWindowOnBreak and debug.focusEditorOnBreak in settings
  4. Extension does not prompt to register: run "DebugMCP: Show Agent Selection Popup" from the Command Palette, or add the MCP config manually per the README
  5. Migrating from the older SSE transport: the extension automatically migrates configuration to Streamable HTTP on activation

Use cases

Letting an AI agent set breakpoints and step through execution to locate runtime defects
Inspecting runtime variable values and expressions without adding logging
Debugging unit tests by passing a testName to pause inside a specific test case
Pausing and inspecting a freely-running program such as a busy loop or embedded target
Interactive debugging across multi-language projects (Python, JS/TS, Java, C/C++, Go, Rust, PHP, Ruby, C#/.NET)

Supported clients

GitHub CopilotFull support
GitHub Copilot CLIFull support
ClineFull support
CursorFull support
CodexFull support
WindsurfFull support
Roo CodeFull support
AntigravityFull support