Skip to content

Commit c7cc190

Browse files
authored
Merge pull request #98 from microsoft/ozzafar/conditional_breakpoint
Ozzafar/conditional breakpoint
2 parents 9cc0da6 + efbd564 commit c7cc190

17 files changed

Lines changed: 75 additions & 41 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to DebugMCP will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
66

7+
## [2.1.0] - 2026-06-23
8+
9+
### Added
10+
- **Conditional breakpoints**`add_breakpoint` now accepts an optional `condition` expression so execution only pauses when the condition evaluates to true (e.g. `i == 5`, `user.id === null`). Conditions are surfaced in `list_breakpoints` and the debug state.
11+
12+
### Changed
13+
- **Renamed the companion Agent Skill from `really-debug` to `debug-live`.** It now installs at `skills/debug-live/` (e.g. `~/.copilot/skills/debug-live/`) and is invoked with `/debug-live`. Previous `really-debug` (and `debug`) installs are cleaned up automatically on registration.
14+
15+
### Fixed
16+
- **`continue`/step no longer hangs when the program runs to completion.** Detection now settles on termination of the specific session being debugged (by identity) instead of waiting for the global active session to clear, which previously hung until the timeout when a parent session (e.g. the JS debug terminal) outlived the program.
17+
718
## [1.2.0] - 2026-06-04
819

920
### Added

README.md

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

2020
## ✨ What's New in 2.0.0
2121

22-
- **`/really-debug` Agent Skill** — DebugMCP now ships a companion [Agent Skill](./skills/really-debug/SKILL.md) that is auto-installed into each configured harness's personal skills directory (e.g. `~/.copilot/skills/really-debug/`). Invoke it with `/really-debug` in supporting agents to load the systematic debugging workflow and trigger DebugMCP tools with the right context.
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.
2323
- **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.
2424

2525
## 🚀 Quick Install
@@ -57,7 +57,7 @@ DebugMCP is an MCP server that gives AI coding agents full control over the VS C
5757
| **step_out** | Step out of the current function | None |
5858
| **continue_execution** | Continue until next breakpoint | None |
5959
| **restart_debugging** | Restart the current debug session | None |
60-
| **add_breakpoint** | Add a breakpoint at a specific line | `fileFullPath` (required)<br>`lineContent` (required) |
60+
| **add_breakpoint** | Add a breakpoint at a specific line (optionally conditional) | `fileFullPath` (required)<br>`lineContent` (required)<br>`condition` (optional) |
6161
| **remove_breakpoint** | Remove a breakpoint from a specific line | `fileFullPath` (required)<br>`line` (required) |
6262
| **clear_all_breakpoints** | Remove all breakpoints at once | None |
6363
| **list_breakpoints** | List all active breakpoints | None |
@@ -67,7 +67,7 @@ DebugMCP is an MCP server that gives AI coding agents full control over the VS C
6767
> **Note:** The MCP server intentionally exposes **tools only** — no procedural
6868
> instructions, no documentation resources. Workflow guidance (when to debug, how to
6969
> structure a root-cause investigation, language-specific quirks) lives in the companion
70-
> [DebugMCP Agent Skill](./skills/really-debug/SKILL.md) so it can be loaded into an
70+
> [DebugMCP Agent Skill](./skills/debug-live/SKILL.md) so it can be loaded into an
7171
> agent's prompt context independently of the MCP capability surface.
7272
7373
### 🎯 Debugging Best Practices

docs/architecture/debugMCPServer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ AI Agent (MCP Client)
3939

4040
`DebugMCPServer` exposes **tools only**. Procedural workflow guidance (when to debug,
4141
how to structure a root-cause investigation, language-specific quirks) lives in the
42-
companion Agent Skill at `skills/really-debug/SKILL.md`, not in tool descriptions or MCP
42+
companion Agent Skill at `skills/debug-live/SKILL.md`, not in tool descriptions or MCP
4343
resources. This separation matches modern agent ecosystems where MCP servers provide
4444
*capabilities* and skills provide *procedural knowledge* an agent loads as context.
4545

@@ -58,7 +58,7 @@ Each request creates a new stateless `StreamableHTTPServerTransport` instance th
5858
- Class definition: `src/debugMCPServer.ts`
5959
- Tool registration: `setupTools()` method (uses `McpServer.registerTool()`)
6060
- Server startup: `start()` method (creates express app with `/mcp` route)
61-
- Agent Skill (companion, not part of the MCP surface): `skills/really-debug/SKILL.md`
61+
- Agent Skill (companion, not part of the MCP surface): `skills/debug-live/SKILL.md`
6262

6363
## Exposed Tools
6464

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: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "debugmcpextension",
33
"displayName": "DebugMCP",
44
"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.0.1",
5+
"version": "2.1.0",
66
"publisher": "ozzafar",
77
"author": {
88
"name": "Oz Zafar",
@@ -79,9 +79,17 @@
7979
"description": "Port number for the DebugMCP server"
8080
},
8181
"debugmcp.bindHost": {
82-
"type": ["string", "array"],
83-
"items": { "type": "string" },
84-
"default": ["127.0.0.1", "::1"],
82+
"type": [
83+
"string",
84+
"array"
85+
],
86+
"items": {
87+
"type": "string"
88+
},
89+
"default": [
90+
"127.0.0.1",
91+
"::1"
92+
],
8593
"markdownDescription": "Network interface(s) the DebugMCP HTTP server binds to. **Defaults to `[\"127.0.0.1\", \"::1\"]` (IPv4 + IPv6 loopback only).** Accepts a single string or an array of strings. ⚠️ **Security warning:** changing this to `0.0.0.0` or a LAN address exposes the unauthenticated MCP debugger — including arbitrary code execution via `evaluate_expression` and `start_debugging` — to every host on the network. Only change this if you fully understand the risk."
8694
}
8795
}
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: really-debug
2+
name: debug-live
33
description: Drive an interactive VS Code debugger to investigate bugs, failing tests, wrong/null variable values, unexpected runtime behavior, and other "it doesn't work" reports. Use this skill whenever speculation about runtime behavior would be cheaper to *verify* by stepping through the code than to reason about. Pairs with the DebugMCP MCP server, which exposes the underlying breakpoint / step / inspect tools.
44
license: MIT
55
allowed-tools:
File renamed without changes.

skills/really-debug/references/troubleshooting/csharp.md renamed to skills/debug-live/references/troubleshooting/csharp.md

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)