Logo van MCP调试工具

MCP调试工具

Community
hwanyong

VSCode extension and CLI tool for MCP-based debugging with DAP protocol support

Uitgeverhwanyong
Repositorymcp-debug-tools
TaalTypeScript
Forks
8
Sterren
24
Beschikbare tools
0
Transporttypestdio, streamable-http
Categorieën
LicentieGPL-3.0
Links
  • Koppel tools aan AI-workflows

    MCP调试工具 biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    24 sterren en 8 forks in de gekoppelde repository.

MCP Debug Tools

The bridge between AI Agents and VS Code Debugger — Let your AI assistant set breakpoints, step through code, and inspect variables in real-time.

VS Code Marketplace npm

Why MCP Debug Tools?

Traditional AI coding assistants can read and write code, but they can't debug it. MCP Debug Tools removes this limitation by giving AI agents direct access to VS Code's debugger through simple CLI commands.

Without MCP Debug ToolsWith MCP Debug Tools
AI guesses at bugs from code readingAI sets breakpoints and inspects live runtime state
"Try adding a console.log here"AI steps through code line-by-line automatically
Manual copy-paste of error messagesAI reads call stacks and variable values as JSON

💡 Direct CLI Control — Works Without MCP Connection

Beyond the standard MCP proxy, you can execute debugging actions via one-off terminal commands — no persistent connection required.

  • Terminal AI Friendly: Shell-based AI agents interact with the debugger directly
  • Zero Connection Overhead: No need to configure or maintain an MCP server connection
  • Easy Parsing: Results in pure JSON (stdout), logs separated to stderr — AI parses instantly
  • Scriptable: Integrate VS Code debugging into automated bash scripts seamlessly
bash
# Discover all available tools
npx @uhd_kr/mcp-debug-tools list

# Execute tools directly
npx @uhd_kr/mcp-debug-tools call add-breakpoint '{"file": "src/app.ts", "line": 15}'
npx @uhd_kr/mcp-debug-tools call step-over

🚀 What's New in v1.0.0

🤖 AI Agent Skill Auto-Injection

The extension now automatically injects skill documents into your workspace when activated, so AI agents can discover and use debugging tools without any manual configuration.

AI PlatformAuto-detected PathStatus
Gemini (Google).gemini/skills/dap-cli-debugging/SKILL.md✅ Supported
Claude Code (Anthropic).claude/skills/dap-cli-debugging/SKILL.md✅ Supported

🔌 Offline CLI Support

Run the CLI directly from the VS Code extension's install path — no internet or npx required.

bash
# macOS / Linux
node ~/.vscode/extensions/uhd.mcp-debug-tools-*/out/cli.js call get-active-session

# Windows (PowerShell)
node "$env:USERPROFILE\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" call get-active-session

📖 Comprehensive Tool Documentation

All 29 debugging tools are now fully documented in the auto-injected skill file, organized by category with parameters and usage examples.

⚠️ Beta Testing

Currently in beta testing. Please report any issues or feedback.

Contact: yoo.hwanyong@gmail.com

🎯 Key Features

Debug Control

  • Breakpoint Management: Add/remove conditional breakpoints, bulk operations
  • Execution Control: Start/stop debug, continue/pause, Step Into/Over/Out
  • Variable Inspection: Check values, evaluate expressions, scope analysis
  • Stack Tracing: Call stack, thread management, exception information

Auto-Connection System

  • Automatic VSCode instance discovery and connection
  • Multiple VSCode windows support
  • Workspace-based configuration management
  • Real-time heartbeat monitoring

📦 Installation

1. VSCode Extension (Required)

Provides debugging capabilities as a server in VSCode.

Method 1: VSCode Marketplace

1. Open VSCode Extensions tab (Ctrl+Shift+X)
2. Search for "MCP Debug Tools"
3. Click Install

Method 2: Direct Link

Method 3: Download Link

2. CLI Tool

Client that connects AI tools with VSCode.

bash
# Run directly with npx (no installation needed)
npx @uhd_kr/mcp-debug-tools

🔧 Configuration

MCP Setup (Cursor/Windsurf)

Add to mcp.json or configuration file:

json
{
  "mcpServers": {
    "dap-proxy": {
      "command": "npx",
      "args": ["-y", "@uhd_kr/mcp-debug-tools@latest"],
      "env": {}
    }
  }
}

CLI Options

bash
# Auto-connect (recommended)
npx @uhd_kr/mcp-debug-tools

# Specify port
npx @uhd_kr/mcp-debug-tools --port=8891

# Disable auto-discovery
npx @uhd_kr/mcp-debug-tools --no-auto

Local Path Fallback (When npx is unavailable)

If npx is unavailable (e.g., offline environment, network restrictions), you can run the CLI directly from the VS Code extension's install directory.

macOS / Linux:

bash
node ~/.vscode/extensions/uhd.mcp-debug-tools-*/out/cli.js <command> [args]

Windows (PowerShell):

powershell
node "$env:USERPROFILE\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" <command> [args]

Windows (CMD):

cmd
node "%USERPROFILE%\.vscode\extensions\uhd.mcp-debug-tools-*\out\cli.js" <command> [args]

Tip: If you installed mcp-debug-tools globally via npm install -g @uhd_kr/mcp-debug-tools, you can simply run mcp-debug-tools <command> directly without npx.

🛠️ Supported Features

MCP Tools (Executable Commands)

Breakpoint Management

  • add-breakpoint - Add breakpoint with conditional support
  • add-breakpoints - Add multiple breakpoints at once
  • remove-breakpoint - Remove specific breakpoint
  • clear-breakpoints - Clear all/specific file breakpoints
  • list-breakpoints - List all breakpoints

Debug Control

  • start-debug - Start debug session
  • stop-debug - Stop debug session
  • continue - Continue execution
  • step-over - Step over line
  • step-into - Step into function
  • step-out - Step out of function
  • pause - Pause execution

State Inspection

  • get-debug-state - Debug session state
  • evaluate-expression - Evaluate expression
  • inspect-variable - Variable details
  • get-variables-scope - All variables in scope
  • get-call-stack - Call stack information
  • get-thread-list - Thread list
  • get-exception-info - Exception information

Configuration Management

  • list-debug-configs - List launch.json configurations
  • select-debug-config - Select debug configuration

Workspace Management

  • select-vscode-instance - Select VSCode instance
  • list-vscode-instances - List active instances
  • get-workspace-info - Workspace information

MCP Resources (Read-only Information)

  • dap-log://current - DAP protocol message log
  • debug://breakpoints - Current breakpoint information
  • debug://active-session - Active debug session info
  • debug://console - Debug console output
  • debug://call-stack - Call stack information
  • debug://variables-scope - Variable scope information

🏗️ Architecture

┌─────────────┐    HTTP    ┌─────────────┐    stdio   ┌─────────────┐
│   VSCode    │ ◄────────► │  CLI Tool   │ ◄────────► │ AI Tool     │
│  Extension  │   (8890)   │             │            │ (Cursor)    │
└─────────────┘            └─────────────┘            └─────────────┘

Auto-Connection Mechanism

  1. Workspace Config: .mcp-debug-tools/config.json - Stores VSCode connection info
  2. Global Registry: ~/.mcp-debug-tools/active-configs.json - Tracks all active instances
  3. Heartbeat: 5-second interval liveness updates
  4. PID Verification: Process status checking

🚀 Getting Started

  1. Install VSCode Extension
  2. Open project in VSCode
  3. Add to AI tool's MCP configuration
  4. Use debugging commands in AI tool

💡 Common Use Cases

1. Finding and Fixing Bugs

Ask your AI assistant to help debug your code:

"There's an error in my calculateTotal function. Can you set breakpoints
at the start of the function and step through to find the issue?"

The AI will:

  • Set breakpoints in the problematic function
  • Start debug session
  • Step through code line by line
  • Inspect variables to identify the bug
  • Suggest fixes based on the debugging data

2. Understanding Complex Code Flow

When exploring unfamiliar codebases:

"I need to understand how the authentication flow works. Can you trace
through the login process step by step?"

The AI will:

  • Identify key authentication functions
  • Set strategic breakpoints
  • Run through the authentication flow
  • Explain each step with actual runtime data
  • Show how data transforms through the process

3. Validating Data Processing

For data transformation pipelines:

"Please verify that my data transformation pipeline correctly processes
the input array and produces the expected output format"

The AI will:

  • Set breakpoints at transformation stages
  • Inspect input data structure
  • Monitor data changes at each step
  • Validate output against requirements
  • Identify any data integrity issues

4. Performance Bottleneck Detection

Finding performance issues:

"My application is running slowly. Can you help identify which functions
are taking the most time during execution?"

The AI will:

  • Set breakpoints at function entry/exit points
  • Monitor execution flow
  • Identify functions called frequently
  • Suggest optimization opportunities
  • Highlight potential bottlenecks

5. Exception Handling Analysis

Debugging runtime errors:

"My app crashes with an unhandled exception. Can you catch it and show
me the exact state when it occurs?"

The AI will:

  • Monitor for exceptions
  • Capture exception details and stack trace
  • Show variable states at crash point
  • Analyze the root cause
  • Suggest error handling improvements

6. Test-Driven Debugging

Debugging failing tests:

"My unit test is failing. Can you debug the test execution and show me
why the assertion fails?"

The AI will:

  • Run tests in debug mode
  • Break at test assertions
  • Compare expected vs actual values
  • Trace back to the source of discrepancy
  • Suggest test or code fixes

🤖 AI Agent Integration Guide

Using MCP Debug Tools with AI Assistants

For AI developers and users who want to leverage MCP Debug Tools in their AI-powered development workflows, we provide a comprehensive rules document that helps AI agents use these debugging tools effectively.

MCP_DEBUG_TOOLS_RULES.md

This document contains essential guidelines and patterns for AI agents to:

  • Understand the proper sequence of debugging operations
  • Handle common debugging scenarios efficiently
  • Recover from errors gracefully
  • Follow best practices for performance and safety

How to Use

  1. For AI Tool Users (Cursor, Windsurf, etc.)

    • Include the rules document in your AI assistant's context when debugging
    • Copy relevant sections from MCP_DEBUG_TOOLS_RULES.md into your prompts
    • Example prompt:
      I need to debug my Node.js application. Please follow the MCP Debug Tools
      rules for proper tool sequencing and error handling.
      [Paste relevant sections from MCP_DEBUG_TOOLS_RULES.md]
  2. For Custom AI Agent Development

    • Use the rules document as a reference for implementing debugging workflows
    • Incorporate the sequential operation patterns into your agent's logic
    • Follow the error recovery strategies for robust debugging automation
  3. Key Sections to Reference

    • Prerequisites Check: Ensure environment is ready before debugging
    • Tool Categories: Understand the 5 main tool categories and their purposes
    • Sequential Operations: Follow the proper order of debugging operations
    • Common Workflows: Pre-built patterns for typical debugging scenarios
    • Error Recovery: Handle failures and recover gracefully

Benefits of Following the Rules

  • ✅ Reduced Errors: Proper tool sequencing prevents common mistakes
  • ✅ Efficient Debugging: Optimized workflows save time and resources
  • ✅ Better AI Assistance: AI can provide more accurate debugging help
  • ✅ Consistent Results: Standardized patterns ensure reliable outcomes

Example AI-Assisted Debugging Session

User: "Help me find why my function returns undefined"

AI (using rules):
1. First, I'll check available VSCode instances (list-vscode-instances)
2. Set a breakpoint at the function start (add-breakpoint)
3. Start debug session (start-debug)
4. When paused, inspect all variables (get-variables-scope)
5. Step through to find where undefined is introduced (step-over)
6. Suggest the fix based on findings

For the complete rules and patterns, see MCP_DEBUG_TOOLS_RULES.md

📊 Current Limitations

  • Real-time sync limited by MCP protocol constraints

🔮 Future Plans

  • Remote debugging
  • Performance profiling tools

🐛 Troubleshooting

CLI Can't Find VSCode

  1. Verify VSCode Extension is active
  2. Check .mcp-debug-tools/config.json exists
  3. Try manual connection with --port option

Multiple VSCode Windows

  • CLI auto-selects based on current directory
  • Use list-vscode-instances to check active instances
  • Use select-vscode-instance to choose specific instance

📄 License

GNU General Public License v3.0 - LICENSE

🤝 Contributing

Issues and Pull Requests welcome!

📚 References


Enjoy debugging with AI! 🚀

Installatie

TypingMind
{
  "mcpServers": {
    "mcp-debug-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@uhd_kr/mcp-debug-tools",
        "--port=8890"
      ]
    }
  }
}

Gebruik MCP调试工具 MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MCP调试工具 is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Je kunt MCP lokaal op je apparaat uitvoeren of verbinding maken met de URL van een externe MCP-server.

Optie 1: Gebruik de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MCP调试工具 toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MCP调试工具.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "mcp-debug-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@uhd_kr/mcp-debug-tools"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MCP调试工具 in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MCP调试工具 in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP调试工具 gebruiken om me hiermee te helpen?
MCP调试工具
Zeker. Ik heb het gelezen.
Dit vond ik met MCP调试工具.

Optie 2: Voeg een MCP-server-URL toe

Gebruik dit als MCP调试工具 al extern wordt gehost of als je team één gedeelde connector wil die meerdere gebruikers kunnen gebruiken.

1

Open MCP-connectoren

Ga in TypingMind naar Plug-ins, open MCP-connectoren en kies URL toevoegen.

  1. Open TypingMind in je browser.
  2. Ga naar Plug-ins.
  3. Open MCP-connectoren.
  4. Klik op URL toevoegen.
TypingMind-formulier om een eigen MCP-server-URL toe te voegen
2

Plak de server-URL

Voer de MCP-server-URL van de aanbieder in het veld Server-URL in. Voeg een verbindingsnaam, beschrijving, icoon, aangepaste HTTP-headers of OAuth-clientinstellingen toe als de server die vereist.

  1. Plak de MCP-server-URL van de aanbieder in het veld Server-URL.
  2. Voer een verbindingsnaam in voor MCP调试工具.
  3. Voeg een beschrijving en een icoon toe om de verbinding makkelijker te herkennen.
  4. Voeg aangepaste HTTP-headers of OAuth-clientgegevens toe als de server authenticatie vereist.
3

Maak de verbinding

Klik op Verbinding maken, ga terug naar de lijst met plug-ins en controleer of de nieuwe MCP-verbinding actief is.

  1. Klik op Verbinding maken.
  2. Ga terug naar de lijst met MCP-connectoren.
  3. Controleer of de verbinding met MCP调试工具 als actief wordt weergegeven.
  4. Vernieuw de lijst met plug-ins als de verbinding niet meteen verschijnt.
4

Wissel van model zonder opnieuw verbinding te maken

Start een chat met je favoriete model, schakel de tools van MCP调试工具 in via Plug-ins en wissel van model wanneer dat nodig is. De MCP-verbinding blijft beschikbaar in de TypingMind-werkruimte.

  1. Start een nieuwe chat in TypingMind.
  2. Selecteer het AI-model dat je wilt gebruiken.
  3. Schakel de tools van MCP调试工具 in via Plug-ins.
  4. Vraag het model om de tool te gebruiken wanneer dat nodig is.
  5. Schakel over naar een ander AI-model en gebruik dezelfde MCP-verbinding opnieuw.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MCP调试工具 gebruiken om me hiermee te helpen?
MCP调试工具
Zeker. Ik heb het gelezen.
Dit vond ik met MCP调试工具.

Veelgestelde vragen

Waarvoor wordt de MCP-server MCP调试工具 gebruikt?

MCP调试工具 is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MCP调试工具 MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MCP调试工具 gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MCP调试工具 MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MCP调试工具 verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MCP调试工具 MCP met TypingMind?

Je kunt MCP调试工具 met TypingMind verbinden via de lokale MCP-connector of door de URL van een externe MCP-server toe te voegen. Gebruik de lokale connector als de server toegang nodig heeft tot bestanden, apps of privébronnen op je apparaat. Gebruik een server-URL als de MCP-server extern wordt gehost.

Welke tools biedt MCP调试工具 MCP in TypingMind?

MCP调试工具 biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MCP调试工具 MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MCP调试工具 authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇