Skip to content

Commit aba0f89

Browse files
committed
enhance documentation for debug-live skill installation and usage
1 parent e51ea24 commit aba0f89

7 files changed

Lines changed: 143 additions & 73 deletions

File tree

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Let AI agents debug your code inside VS Code - set breakpoints, step through exe
44

55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
66
[![VS Code](https://img.shields.io/badge/VS%20Code-1.104.0+-blue.svg)](https://code.visualstudio.com/)
7-
[![Version](https://img.shields.io/badge/version-2.0.1-green.svg)](https://github.com/microsoft/DebugMCP)
7+
[![Version](https://img.shields.io/badge/version-2.2.1-green.svg)](https://github.com/microsoft/DebugMCP)
88
[![VS Marketplace](https://img.shields.io/badge/VS%20Marketplace-Install-blue.svg)](https://marketplace.visualstudio.com/items?itemName=ozzafar.debugmcpextension)
99

1010
> **If you find DebugMCP useful, please [star the repo on GitHub](https://github.com/microsoft/DebugMCP)!** It helps others discover the project and motivates continued development.
@@ -17,10 +17,12 @@ Let AI agents debug your code inside VS Code - set breakpoints, step through exe
1717
<img src="assets/DebugMCP.gif" width="800">
1818
</p>
1919

20-
## ✨ What's New in 2.0.0
20+
## ✨ What's New
2121

22-
- **`/debug-live` Agent Skill** — DebugMCP now ships a companion [Agent Skill](./skills/debug-live/SKILL.md) that is auto-installed into each configured harness's personal skills directory (e.g. `~/.copilot/skills/debug-live/`). Invoke it with `/debug-live` in supporting agents to load the systematic debugging workflow and trigger DebugMCP tools with the right context.
23-
- **Robust debugging via the VS Code Testing API**`start_debugging` with a `testName` now uses the VS Code Testing API to discover and launch the test, replacing the previous best-effort path. This works reliably across language test runners that integrate with the Testing API (pytest, Jest/Vitest, Java, .NET, Go, etc.) and produces consistent breakpoint hits inside individual test cases.
22+
### 2.2
23+
- **Cross-agent `debug-live` skill install** — the systematic debugging workflow ships as an [Agent Skill](https://agentskills.io) and is now installed into the **standard skills directories**`~/.agents/skills/` (the cross-agent location honored by skills-compatible harnesses, including VS Code agent mode) and `~/.copilot/skills/` when present — so it's discoverable everywhere instead of being copied next to each agent's config where nothing scans it (fixes [#105](https://github.com/microsoft/DebugMCP/issues/105), where VS Code never loaded the skill). The server also advertises MCP `instructions` and the `start_debugging` tool points at the skill for the full workflow.
24+
- **Pause running programs** — new `pause_execution` tool interrupts a freely-running program and stops at its current location, even with no breakpoint set (great for busy loops and embedded/bare-metal targets), so you can then inspect state or step from there.
25+
- **Robust debugging via the VS Code Testing API**`start_debugging` with a `testName` uses the VS Code Testing API to discover and launch the test, producing consistent breakpoint hits inside individual test cases across language test runners (pytest, Jest/Vitest, Java, .NET, Go, etc.).
2426

2527
## 🚀 Quick Install
2628

@@ -56,6 +58,7 @@ DebugMCP is an MCP server that gives AI coding agents full control over the VS C
5658
| **step_into** | Step into function calls | None |
5759
| **step_out** | Step out of the current function | None |
5860
| **continue_execution** | Continue until next breakpoint | None |
61+
| **pause_execution** | Interrupt a freely-running program and stop at its current location (no breakpoint needed) | None |
5962
| **restart_debugging** | Restart the current debug session | None |
6063
| **add_breakpoint** | Add a breakpoint at a specific line (optionally conditional) | `fileFullPath` (required)<br>`lineContent` (required)<br>`condition` (optional) |
6164
| **remove_breakpoint** | Remove a breakpoint from a specific line | `fileFullPath` (required)<br>`line` (required) |
@@ -64,11 +67,13 @@ DebugMCP is an MCP server that gives AI coding agents full control over the VS C
6467
| **get_variables_values** | Get variables and their values at current execution point | `scope` (optional: 'local', 'global', 'all') |
6568
| **evaluate_expression** | Evaluate an expression in debug context | `expression` (required) |
6669

67-
> **Note:** The MCP server intentionally exposes **tools only** — no procedural
68-
> instructions, no documentation resources. Workflow guidance (when to debug, how to
69-
> structure a root-cause investigation, language-specific quirks) lives in the companion
70-
> [DebugMCP Agent Skill](./skills/debug-live/SKILL.md) so it can be loaded into an
71-
> agent's prompt context independently of the MCP capability surface.
70+
> **Note:** The MCP server exposes **tools** for debugger actions, while the procedural
71+
> workflow guidance (when to debug, how to structure a root-cause investigation,
72+
> language-specific quirks) lives in the companion [Agent Skill](./skills/debug-live/SKILL.md).
73+
> Tool descriptions stay terse and behavioral; the extension installs the `debug-live` skill
74+
> into the standard skills directories (`~/.agents/skills/`, plus `~/.copilot/skills/` when
75+
> present) so skills-compatible harnesses load the full workflow on demand. The server also
76+
> advertises MCP `instructions` pointing agents at it before debugging.
7277
7378
### 🎯 Debugging Best Practices
7479

docs/architecture/agentConfigurationManager.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,22 @@ url = "http://localhost:3001/mcp"
7373

7474
Uses VS Code's `globalState` to track whether the onboarding popup has been shown, preventing repeated prompts on every activation.
7575

76+
### Skill delivery — standard skills directories
77+
78+
The `debug-live` Agent Skill is installed into the **standard personal skills directories** defined by the Agent Skills open standard (agentskills.io), rather than being copied next to each agent's config file:
79+
- **`~/.agents/skills/debug-live/`** — the cross-agent location honored by skills-compatible harnesses, including VS Code agent mode and Copilot CLI. Always installed.
80+
- **`~/.copilot/skills/debug-live/`** — Copilot's own skills path; also installed when a Copilot home directory (`~/.copilot`, or `$COPILOT_HOME`) exists.
81+
82+
`installDebugMCPSkill()` copies the one bundled source (`skills/debug-live/SKILL.md`) into each target with `force: true` (idempotent refresh) and removes stale legacy copies (`debug`, `really-debug`). It is agent-independent — a single shared install covers every skills-compatible harness.
83+
84+
This fixes issue #105: earlier builds copied the skill next to each agent's config (e.g. `Code/User/skills/` for VS Code Copilot), a directory no harness scans, so the skill never loaded. Installing to `~/.agents/skills/` — which VS Code agent mode does scan — makes it discoverable.
85+
7686
## Key Code Locations
7787

7888
- Class definition: `src/utils/agentConfigurationManager.ts`
7989
- Agent definitions: `getSupportedAgents()`
8090
- Config writing: `addDebugMCPToAgent()`
91+
- Skill install: `installDebugMCPSkill()` / `getSkillInstallTargets()` / `ensureSkillRegistered()`
8192
- Codex TOML upsert: `upsertCodexDebugMCPConfig()`
8293
- Path detection: `getConfigBasePath()`
8394
- Popup logic: `shouldShowPopup()`, `showAgentSelectionPopup()`
@@ -91,6 +102,8 @@ Uses VS Code's `globalState` to track whether the onboarding popup has been show
91102
5. Show success message with option to open config file
92103
6. Mark popup as shown
93104

105+
The bundled `debug-live` skill is installed into the standard skills directories (`~/.agents/skills/`, plus `~/.copilot/skills/` when present) during step 4, so every skills-compatible harness discovers it from one shared location.
106+
94107
## Commands
95108

96109
- `debugmcp.showAgentSelectionPopup`: Manually trigger agent setup

docs/architecture/debugMCPServer.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,26 @@ AI Agent (MCP Client)
3535

3636
## Key Concepts
3737

38-
### Tools only — no resources, no instructions
38+
### Tools plus the debug-live skill
3939

40-
`DebugMCPServer` exposes **tools only**. Procedural workflow guidance (when to debug,
41-
how to structure a root-cause investigation, language-specific quirks) lives in the
42-
companion Agent Skill at `skills/debug-live/SKILL.md`, not in tool descriptions or MCP
43-
resources. This separation matches modern agent ecosystems where MCP servers provide
44-
*capabilities* and skills provide *procedural knowledge* an agent loads as context.
40+
`DebugMCPServer` exposes **tools** for debugger capabilities. Detailed procedural guidance
41+
(when to debug, how to structure a root-cause investigation, language-specific quirks) lives
42+
in the companion Agent Skill at `skills/debug-live/SKILL.md`, which `AgentConfigurationManager`
43+
installs into the standard personal skills directories (`~/.agents/skills/`, and
44+
`~/.copilot/skills/` when present) so skills-compatible harnesses load it on demand. This
45+
separation matches modern agent ecosystems where MCP servers provide *capabilities* and
46+
skills provide *procedural knowledge* an agent loads as context.
4547

4648
Tool descriptions are intentionally terse and behavioral — they describe *what* the
4749
tool does, not *when* or *how* to use it in a multi-step workflow.
4850

51+
### Ensuring the workflow is loaded
52+
53+
The server `instructions` (passed to the `McpServer` constructor and returned to the client
54+
at `initialize`) and the `start_debugging` tool description both point agents at the
55+
`debug-live` skill for the full step-through workflow, so the pointer is visible even before
56+
the skill activates.
57+
4958
### Streamable HTTP Transport
5059

5160
Uses stateless HTTP POST requests for MCP communication. The express server exposes:
@@ -58,7 +67,7 @@ Each request creates a new stateless `StreamableHTTPServerTransport` instance th
5867
- Class definition: `src/debugMCPServer.ts`
5968
- Tool registration: `setupTools()` method (uses `McpServer.registerTool()`)
6069
- Server startup: `start()` method (creates express app with `/mcp` route)
61-
- Agent Skill (companion, not part of the MCP surface): `skills/debug-live/SKILL.md`
70+
- Agent Skill (procedural workflow): `skills/debug-live/SKILL.md`
6271

6372
## Exposed Tools
6473

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "debugmcpextension",
3-
"displayName": "DebugMCP",
4-
"description": "Let AI agents debug your code inside VS Code — breakpoints, step-through execution, variable inspection, and expression evaluation. Automatically exposes itself as an MCP (Model Context Protocol) server for seamless integration with AI assistants.",
5-
"version": "2.1.0",
3+
"displayName": "DebugMCP — AI Agent Debugging for VS Code",
4+
"description": "Your AI agent debugs for you — right inside VS Code. Let Copilot, Cline, Cursor, Codex & any MCP agent set breakpoints, step through code, and inspect variables live instead of guessing from logs.",
5+
"version": "2.2.1",
66
"publisher": "ozzafar",
77
"author": {
88
"name": "Oz Zafar",
@@ -28,15 +28,34 @@
2828
"breakpoints",
2929
"debugger",
3030
"ai agent",
31-
"copilot"
31+
"copilot",
32+
"cline",
33+
"cursor",
34+
"windsurf",
35+
"roo code",
36+
"codex",
37+
"claude",
38+
"autonomous debugging",
39+
"agent debugging",
40+
"test debugging",
41+
"pytest",
42+
"jest",
43+
"debug adapter protocol",
44+
"dap"
3245
],
3346
"engines": {
3447
"vscode": "^1.104.0"
3548
},
3649
"icon": "assets/debug_mcp_icon.png",
50+
"galleryBanner": {
51+
"color": "#1e1e1e",
52+
"theme": "dark"
53+
},
3754
"categories": [
3855
"Debuggers",
3956
"AI",
57+
"Chat",
58+
"Machine Learning",
4059
"Programming Languages"
4160
],
4261
"extensionDependencies": [],

src/debugMCPServer.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ export class DebugMCPServer {
144144
const server = new McpServer({
145145
name: 'debugmcp',
146146
version: '1.0.0',
147+
}, {
148+
// Surfaced to clients at `initialize`. Points agents at the
149+
// `debug-live` Agent Skill, which the extension installs into the
150+
// standard skills directories for harnesses that load skills.
151+
instructions: 'These tools drive the VS Code debugger to investigate bugs, failing tests, ' +
152+
'wrong/null values and other "it doesn\'t work" reports by stepping through code. ' +
153+
'The companion "debug-live" Agent Skill describes the full interactive workflow: ' +
154+
'when to set breakpoints, how to step and inspect state, and how to do root-cause analysis.',
147155
});
148156
this.setupTools(server);
149157
return server;
@@ -162,7 +170,7 @@ export class DebugMCPServer {
162170
server.registerTool('start_debugging', {
163171
description: 'Start a VS Code debug session for a source file, optionally for a single test method. ' +
164172
'Use when investigating bugs, failing tests, wrong/null variable values, unexpected runtime behavior, ' +
165-
'or any "it doesn\'t work" report.',
173+
'or any "it doesn\'t work" report. See the "debug-live" skill for the full investigation workflow.',
166174
inputSchema: {
167175
fileFullPath: z.string().describe('Full path to the source code file to debug'),
168176
workingDirectory: z.string().describe('Working directory for the debug session'),

0 commit comments

Comments
 (0)