AGENTS.md · microsoft/DebugMCP
AGENTS.md from microsoft/DebugMCP: 94 lines covering Project Overview, Documentation Maintenance, File Header, Build/Lint/Test Commands and more.
Template by microsoft
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/microsoft/DebugMCP/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 94 lines
- File
AGENTS.md
Sections
- Project Overview
- Documentation Maintenance
- File Header
- Build/Lint/Test Commands
- Code Style & Conventions
- Key Dependencies
- Entry Points
- Configuration
- Documentation Resources
First lines (shown under the repo's MIT license)
# Agent Guidelines for DebugMCP
## Project Overview
DebugMCP is a VS Code extension that embeds an MCP (Model Context Protocol) server, enabling AI coding agents to control VS Code's debugger via DAP (Debug Adapter Protocol). AI agents can start/stop debugging, step through code, set breakpoints, inspect variables, and evaluate expressions.
### Architecture
```
AI Agent (Cline/Copilot/Cursor) → MCP/SSE → DebugMCPServer → DebuggingHandler → DebuggingExecutor → VS Code Debug API
```
### Key Components
| Component | Responsibility | Docs |
|-----------|----------------|------|
| `DebugMCPServer` | MCP server, tool/resource registration | [docs/architecture/debugMCPServer.md](docs/architecture/debugMCPServer.md) |
| `DebuggingHandler` | Operation orchestration, state change detection | [docs/architecture/debuggingHandler.md](docs/architecture/debuggingHandler.md) |
| `DebuggingExecutor` | VS Code debug API calls, DAP requests | [docs/architecture/debuggingExecutor.md](docs/architecture/debuggingExecutor.md) |
| `DebugState` | Debug session state model | [docs/architecture/debugState.md](docs/architecture/debugState.md) |
| `DebugConfigurationManager` | Launch configs, language detection | [docs/architecture/debugConfigurationManager.md](docs/architecture/debugConfigurationManager.md) |
| `AgentConfigurationManager` | AI agent auto-configuration | [docs/architecture/agentConfigurationManager.md](docs/architecture/agentConfigurationManager.md) |
## Documentation Maintenance
**IMPORTANT**: Keep `docs/*.md` files up to date when modifying components. These docs should remain high-level:
- Purpose and motivation
- Responsibility scope
- Key concepts and patterns
- Pointers to relevant code sections
Do NOT duplicate detailed implementation in docs - that information should be inferred from the code itself.
## File Header
Include in each source file:
```typescript
// Copyright (c) Microsoft Corporation.
```
## Build/Lint/Test Commands
| Command | Description |
|---------|-------------|
| `npm run compile` | Compile TypeScript to `out/` |
| `npm run lint` | Run ESLint on `src/` |
| `npm test` | Run all tests (`src/test/*.test.ts`) |
| `npm run watch` | Compile in watch mode |
## Code Style & Conventions
- **TypeScript**: Strict mode, ES2022 target, Node16 modules
- **Imports**: vscode → external packages → internal modules
- **Naming**: camelCase (variables/functions), PascalCase (classes/interfaces), `I` prefix for interfaces
- **Types**: Explicit types preferred, strict null checks, avoid `any`
- **Error Handling**: try-catch with descriptive messages, throw `Error` objects
- **Formatting**: Semicolons, curly braces for all control structures, tabs for indentation
- **Async**: async/await, exponential backoff for retries
- **Logging**: Use `logger` from `./utils/logger` (not `console.log`). Simple wrapper providing `info`, `warn`, `error` methods with consistent formatting.
- **VS Code API**: Import as `import * as vscode from 'vscode'`
## Key Dependencies
- `@modelcontextprotocol/sdk`: Official MCP server framework (`McpServer`, `SSEServerTransport`)
- `zod`: Schema validation for tool parameters
- `express`: HTTP server for SSE transport
## Entry Points
- **Extension activation**: `src/extension.ts` → `activate()`
- **MCP endpoint**: `http://localhost:{port}/sse` (default port: 3001)
## Configuration
| Setting | Default | Description |
|---------|---------|-------------|
| `debugmcp.serverPort` | 3001 | MCP server port |
| `debugmcp.timeoutInSeconds` | 180 | Operation timeout |
## Documentation Resources
The `docs/` folder contains two types of documentation:
**Component docs** (referenced in Key Components table above): Developer documentation for understanding the codebase architecture.
**AI Agent resources** (served via MCP at runtime):
| File | Purpose |
|------|---------|
| `agent-resources/debug_instructions.md` | Core debugging workflow guide for AI agents |
| `agent-resources/troubleshooting/*.md` | Language-specific debugging tips (Python, JavaScript, Java, C#) |
These resource files are loaded by `DebugMCPServer` and exposed as MCP resources that AI agents can read to learn how to use the debugging tools effectively.Signals
- Stars
- 573
- Forks
- 63
- Open issues
- 22
- Last commit (this folder)
- Feb 21, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/microsoft/DebugMCP
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from microsoft
- 0.714score
skillopt-sleep
microsoftOfficial
Reference-only OpenClaw adaptation of SkillOpt-Sleep.
SkillAFreshness: A★ 18.7KClaude Code +9 - 0.707score
Playwright MCP
microsoftOfficial
Playwright Tools.
ConnectorAFreshness: ALocal★ 38.6KClaude Code +5 - 0.687score
squad
microsoftOfficial
Squad's command catalog and interactive menu.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
coordinator-response-mode
microsoftOfficial
Selecting WHO handles work is the Routing table; selecting HOW they handle it (Direct, Lightweight, Standard, Full) is Response Mode.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
coordinator-source-of-truth
microsoftOfficial
The complete file-by-file source-of-truth hierarchy for Squad: which files are authoritative, which are derived/append-only, who may write each one, who may…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.687score
squad-commands
microsoftOfficial
Categorized catalog of common Squad operations.
SkillAFreshness: A★ 1.4KClaude Code +9
Cite this page
AGENTS.md · microsoft/DebugMCP. Agent Mart. https://agentmart.dev/templates/microsoft-debugmcp-agents-md (last updated 2026-10-24)