Skip to content
Agentmart
Submit a tool

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

IndexedMIT★ 573
Write a review

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.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that microsoft/DebugMCP (573 stars) keeps for coding agents. It has 94 lines in 9 sections: Project Overview; Documentation Maintenance; File Header; Build/Lint/Test Commands; Code Style & Conventions; Key Dependencies; Entry Points; Configuration; Documentation Resources. Use it as a model for your own project's instructions.

Use cases: prompt-engineering

No 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

  1. Project Overview
  2. Documentation Maintenance
  3. File Header
  4. Build/Lint/Test Commands
  5. Code Style & Conventions
  6. Key Dependencies
  7. Entry Points
  8. Configuration
  9. 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
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from microsoft

Cite this page

AGENTS.md · microsoft/DebugMCP. Agent Mart. https://agentmart.dev/templates/microsoft-debugmcp-agents-md (last updated 2026-10-24)