dap-mcp-server 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -0
- package/integrations/codex/.agents/plugins/marketplace.json +20 -0
- package/integrations/codex/dap-debugging/mcp.json +13 -0
- package/integrations/codex/dap-debugging/plugin.json +16 -0
- package/integrations/codex/dap-debugging/skills/dap-debugging/SKILL.md +51 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -71,6 +71,57 @@ npm install
|
|
|
71
71
|
npm run build
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
+
## Usage with Codex
|
|
75
|
+
|
|
76
|
+
Choose either direct MCP registration or the plugin; installing both exposes the same
|
|
77
|
+
debugger twice. The plugin also supplies the activation skill.
|
|
78
|
+
|
|
79
|
+
### Direct MCP registration
|
|
80
|
+
|
|
81
|
+
Register the stdio server in Codex CLI (the CLI and IDE extension share this configuration):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
codex mcp add dap -- npx -y dap-mcp-server
|
|
85
|
+
codex mcp list
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For a source checkout, build first and register the absolute entry-point path instead:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm ci
|
|
92
|
+
npm run build
|
|
93
|
+
codex mcp add dap -- node "$(pwd)/build/index.js"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Direct registration exposes the tools but does not install the activation skill. To add
|
|
97
|
+
the skill to a project after a global npm install:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mkdir -p .agents/skills/dap-debugging
|
|
101
|
+
cp "$(npm root -g)/dap-mcp-server/SKILL.md" .agents/skills/dap-debugging/SKILL.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Plugin: MCP server and activation skill
|
|
105
|
+
|
|
106
|
+
The npm package also ships a Codex plugin that bundles the MCP declaration with the
|
|
107
|
+
`dap-debugging` activation skill. After a global install, register its marketplace and
|
|
108
|
+
install the plugin:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npm install -g dap-mcp-server
|
|
112
|
+
codex plugin marketplace add "$(npm root -g)/dap-mcp-server/integrations/codex"
|
|
113
|
+
codex plugin add dap-debugging@dap-mcp-server
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
From a source checkout, the marketplace path is `"$(pwd)/integrations/codex"`. The
|
|
117
|
+
plugin launches the published npm server via `npx`; use direct registration with
|
|
118
|
+
`build/index.js` to test changes to the server itself.
|
|
119
|
+
|
|
120
|
+
Start a new Codex session after installation. Ask Codex to run `debug_doctor` with the
|
|
121
|
+
project's absolute `cwd`, then use `debug_at` for one-shot breakpoint inspection.
|
|
122
|
+
The activation skill provides this workflow when installed. Debug adapters must still
|
|
123
|
+
be installed separately (see the supported-adapters table above).
|
|
124
|
+
|
|
74
125
|
## Usage with Claude Code
|
|
75
126
|
|
|
76
127
|
Register the server for the current user:
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dap-mcp-server",
|
|
3
|
+
"interface": {
|
|
4
|
+
"displayName": "DAP MCP Server"
|
|
5
|
+
},
|
|
6
|
+
"plugins": [
|
|
7
|
+
{
|
|
8
|
+
"name": "dap-debugging",
|
|
9
|
+
"source": {
|
|
10
|
+
"source": "local",
|
|
11
|
+
"path": "./dap-debugging"
|
|
12
|
+
},
|
|
13
|
+
"policy": {
|
|
14
|
+
"installation": "AVAILABLE",
|
|
15
|
+
"authentication": "ON_INSTALL"
|
|
16
|
+
},
|
|
17
|
+
"category": "Developer Tools"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
|
+
"name": "dap-debugging",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Debug local programs with standard Debug Adapter Protocol adapters.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Ivan Iraci"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"debugging",
|
|
12
|
+
"dap",
|
|
13
|
+
"mcp",
|
|
14
|
+
"codex"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dap-debugging
|
|
3
|
+
description: Use a real debugger for opaque test failures, crashes, swallowed exceptions, incorrect runtime state, or a bug that remains unexplained after static inspection or a failed fix. Prefer this over adding multiple print statements when actual values, branches, or call stacks are needed.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debug Code with DAP
|
|
7
|
+
|
|
8
|
+
Use the `dap` MCP server when static inspection cannot explain a runtime failure. Debugging executes local code and can trigger its normal side effects, so do not run untrusted targets.
|
|
9
|
+
|
|
10
|
+
## Preferred Workflow
|
|
11
|
+
|
|
12
|
+
1. Call `debug_doctor` with the project `cwd`. Follow its remediation when `ready` is false.
|
|
13
|
+
2. Choose an executable line near the first observable bad state.
|
|
14
|
+
3. Call `debug_at` with `file`, `line`, and a small set of hypothesis-driven `expressions`. It detects the adapter, launches, inspects, and cleans up in one call.
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"cwd": "/workspace/project",
|
|
19
|
+
"program": "/workspace/project/app.py",
|
|
20
|
+
"file": "/workspace/project/app.py",
|
|
21
|
+
"line": 42,
|
|
22
|
+
"expressions": ["request.user", "result"]
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Read the outcome precisely:
|
|
27
|
+
|
|
28
|
+
- `hit: true`: use the location and values as evidence.
|
|
29
|
+
- `status: terminated`: execution finished before the breakpoint; verify path, arguments, and branch.
|
|
30
|
+
- `timedOut: true`: inspect captured output and narrow the target.
|
|
31
|
+
- With `hit: false`, `breakpoint.verified: false` means the adapter could not bind the source location.
|
|
32
|
+
|
|
33
|
+
Pass adapter-specific fields through `launchConfig`. Use absolute program and source paths.
|
|
34
|
+
|
|
35
|
+
## Failing Tests
|
|
36
|
+
|
|
37
|
+
Debug the smallest failing test. Supply its runner as `program` or through `launchConfig`, and its selector in `args`. Launch conventions differ across adapters; retain known-good fields from `.vscode/launch.json`. Put the breakpoint in application code before the assertion or exception boundary.
|
|
38
|
+
|
|
39
|
+
## Interactive Exploration
|
|
40
|
+
|
|
41
|
+
Use `debug_launch` only for multiple stops or stepping. A launch with breakpoints waits by default and reports stopped, terminated, or timeout.
|
|
42
|
+
|
|
43
|
+
1. Inspect the state returned by `debug_launch`.
|
|
44
|
+
2. Use `evaluate` for focused questions.
|
|
45
|
+
3. Prefer `step` with `next`; use `stepIn` only when the callee is suspect.
|
|
46
|
+
4. Move breakpoints with `set_breakpoints` as the hypothesis changes.
|
|
47
|
+
5. Finish with `debug_disconnect`.
|
|
48
|
+
|
|
49
|
+
`step` answers compactly (frame-local scopes, short stack, new output only); use `get_state` for globals, deeper stacks, or `scopes: ["Registers"]`. For a running or suspended process, call `debug_attach` with `breakpoints` so they bind before it resumes.
|
|
50
|
+
|
|
51
|
+
Omit `sessionId` when one session is active. Use `debug_run` when output and termination are sufficient. For repeated observations, use logpoints (`logMessage`) and read them with `get_output` instead of editing source to add prints.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dap-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "MCP server wrapping the Debug Adapter Protocol for AI-driven debugging",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LLM",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"build",
|
|
24
24
|
"SKILL.md",
|
|
25
|
-
"integrations/claude/dap-debugging"
|
|
25
|
+
"integrations/claude/dap-debugging",
|
|
26
|
+
"integrations/codex"
|
|
26
27
|
],
|
|
27
28
|
"directories": {
|
|
28
29
|
"doc": "docs"
|