dap-mcp-server 0.1.16 → 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 CHANGED
@@ -18,9 +18,22 @@ Any DAP-compliant debug adapter works. Built-in defaults for:
18
18
  | Go | Delve | `go install github.com/go-delve/delve/cmd/dlv@latest` |
19
19
  | Node.js / TypeScript | vscode-js-debug | Configure its `dapDebugServer.js` path or install it in the project |
20
20
  | C/C++ | lldb-dap | `apt install lldb` / `brew install llvm` |
21
+ | Rust | lldb-dap (same `cppdbg` adapter) | as above, plus the Rust LLDB formatters (bundled with rustup toolchains; the `rust-lldb` package on distro-packaged Rust) |
22
+ | PHP | vscode-php-debug + xdebug 3 | Install xdebug, then point the `php` adapter's `program` at `out/phpDebug.js` |
21
23
 
22
24
  Additional adapters, and project-specific paths for the built-ins, can be registered via `configure_adapter` or config files.
23
25
 
26
+ ### Launch recipes are built in
27
+
28
+ The per-language incantations that usually stand between an agent and its first breakpoint ship with the server:
29
+
30
+ - **PHP** — the `php` adapter's `launchDefaults` carry the xdebug `runtimeArgs` and listen port. They are merged into a user-configured `php` entry, so you only supply the `phpDebug.js` path. If PHP still runs past a breakpoint, the result carries a `hint` pointing at xdebug.
31
+ - **Rust** — sessions that break in `.rs` files load `lldb_lookup.py` from the active toolchain's sysroot, so `String`, `&str`, `Vec` and `HashMap` render as values instead of raw structs. `debug_at` defaults `program` to `target/debug/<package name>`.
32
+ - **Go** — `cwd` is mirrored to `dlvCwd` so delve builds from the module directory.
33
+ - **Java / JDWP** — `debug_doctor` prints the `-agentlib:jdwp=…` line to start the JVM with; `debug_attach` accepts `breakpoints` so they bind before a `suspend=y` VM resumes.
34
+
35
+ `debug_doctor` and `debug_at` detect the language from manifests (`pyproject.toml`, `go.mod`, `Cargo.toml`, `composer.json`, `pom.xml`, `build.gradle`, `CMakeLists.txt`, `package.json`), from the breakpoint file's extension, and — for manifest-less script directories — from the source files in `cwd` and `cwd/src`.
36
+
24
37
  ## MCP Tools
25
38
 
26
39
  | Tool | Description |
@@ -30,15 +43,15 @@ Additional adapters, and project-specific paths for the built-ins, can be regist
30
43
  | `debug_inspect` | **One-shot:** launch → run to breakpoint → evaluate expressions → disconnect when the adapter is already known. |
31
44
  | `debug_run` | **One-shot:** launch → run to completion → return all output. Combine with logpoints for printf-style debugging without editing source. |
32
45
  | `debug_launch` | Start an interactive debug session (launch a program with breakpoints) |
33
- | `debug_attach` | Attach to a running process |
46
+ | `debug_attach` | Attach to a running process; pass `breakpoints` / `exceptionBreakpoints` to bind them before it resumes |
34
47
  | `debug_restart` | Restart with the same configuration |
35
48
  | `debug_disconnect` | End a debug session |
36
49
  | `set_breakpoints` | Set/replace breakpoints in a file (use `logMessage` for logpoints) |
37
50
  | `set_exception_breakpoints` | Break on exceptions |
38
51
  | `list_breakpoints` | List currently-registered breakpoints for a session |
39
- | `get_state` | Get threads, stack trace, scopes, and variables |
52
+ | `get_state` | Get threads, stack trace, scopes, and variables (`scopes: ["Registers"]` to opt into CPU registers, `detail: "compact"` for a slim view) |
40
53
  | `evaluate` | Evaluate an expression in the debuggee context |
41
- | `step` | Continue, next, stepIn, stepOut, or pause |
54
+ | `step` | Continue, next, stepIn, stepOut, or pause; answers compactly by default (`detail: "full"` for the `get_state` shape) |
42
55
  | `get_output` | Get buffered stdout/stderr |
43
56
  | `configure_adapter` | Register a custom debug adapter |
44
57
  | `list_adapters` | List available adapters |
@@ -58,6 +71,57 @@ npm install
58
71
  npm run build
59
72
  ```
60
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
+
61
125
  ## Usage with Claude Code
62
126
 
63
127
  Register the server for the current user:
@@ -111,6 +175,15 @@ For a global npm install, the source file is under `$(npm root -g)/dap-mcp-serve
111
175
 
112
176
  Tools are deliberately coarse-grained. `debug_doctor` makes setup failures actionable and `debug_at` performs the common detect → launch → stop → inspect → cleanup workflow in one call. A single `get_state` call returns threads, stack trace, scopes, and variables. The `step` tool blocks until the debuggee stops again and returns the new state.
113
177
 
178
+ Responses are budgeted for an LLM's context window:
179
+
180
+ - CPU register scopes are never fetched unless asked for by name; skipped scopes are listed in `omittedScopes`.
181
+ - `step` returns a compact state: frame-local scopes only, a 5-frame stack, no thread list for single-threaded programs, minified JSON.
182
+ - A state carries only output that no earlier `debug_launch`/`step` response has reported (capped at the newest 50 entries, with `outputOmitted`); `get_output` always has the whole buffer.
183
+ - `debug_doctor` details only the selected adapter (`verbose: true` for all); a not-ready `debug_at` answers with a one-line summary.
184
+
185
+ Stops on an exception include `exception: { id, description, breakMode }`. When the program ends, `debug_run`, `debug_at`, `debug_launch` and `step` report its `exitCode` if the adapter provides one.
186
+
114
187
  Session IDs are optional when only one debug session is active. Breakpoints can be set inline with `debug_launch` for single-call debugging setup.
115
188
 
116
189
  See [docs/plans/2026-03-05-dap-wrapper-mcp-design.md](docs/plans/2026-03-05-dap-wrapper-mcp-design.md) for the full design document.
package/SKILL.md CHANGED
@@ -51,6 +51,10 @@ Use `debug_launch` only when one-shot inspection is insufficient, such as multip
51
51
  5. Use `set_breakpoints` to move or add breakpoints.
52
52
  6. Always finish with `debug_disconnect`.
53
53
 
54
+ `step` answers compactly: frame-local scopes, a short stack, and only output not reported before. Call `get_state` when globals, a deeper stack, or `variableDepth` > 1 are needed; CPU registers are fetched only with `scopes: ["Registers"]`. Read the whole output buffer with `get_output`.
55
+
56
+ To debug a process that is already running or was started suspended (JVM with JDWP `suspend=y`, a server), use `debug_attach` and pass `breakpoints` in that same call so they bind before the process resumes.
57
+
54
58
  Omit `sessionId` when exactly one session is active. Use absolute paths for programs and source files.
55
59
 
56
60
  ## Output-First Debugging
@@ -68,5 +68,30 @@ export const BUILTIN_ADAPTERS = [
68
68
  args: [],
69
69
  installHint: "apt install lldb (Debian/Ubuntu) or brew install llvm (macOS)",
70
70
  },
71
+ // php adapter: vscode-php-debug's phpDebug.js. Like node, there is no
72
+ // universal install path, so the user points `program` at it; the
73
+ // launchDefaults below still apply to that override (the registry merges
74
+ // them across tiers).
75
+ {
76
+ type: "php",
77
+ runtime: "node",
78
+ program: "phpDebug.js",
79
+ args: [],
80
+ // The adapter listens on `port` and xdebug connects back to it. Without
81
+ // these runtimeArgs PHP runs to completion before xdebug ever connects,
82
+ // so no breakpoint is hit.
83
+ launchDefaults: {
84
+ port: 9003,
85
+ hostname: "127.0.0.1",
86
+ runtimeArgs: [
87
+ "-dxdebug.mode=debug",
88
+ "-dxdebug.start_with_request=yes",
89
+ "-dxdebug.client_host=127.0.0.1",
90
+ "-dxdebug.client_port=9003",
91
+ ],
92
+ },
93
+ installHint: "Install xdebug 3 and vscode-php-debug, then set the adapter's `program` to its out/phpDebug.js path " +
94
+ "(e.g. via `configure_adapter`). See https://github.com/xdebug/vscode-php-debug.",
95
+ },
71
96
  ];
72
97
  //# sourceMappingURL=builtin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/adapters/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,CAAC,iBAAiB,CAAC;QACzB,cAAc,EAAE;YACd,OAAO,EAAE,iBAAiB;SAC3B;QACD,WAAW,EAAE,qBAAqB;KACnC;IACD;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC;QACrC,SAAS,EAAE,KAAK;QAChB,sDAAsD;QACtD,WAAW,EAAE,yCAAyC;QACtD,WAAW,EAAE,qDAAqD;KACnE;IACD,2EAA2E;IAC3E,2EAA2E;IAC3E,2CAA2C;IAC3C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,mBAAmB;QAC5B,wEAAwE;QACxE,qEAAqE;QACrE,YAAY;QACZ,IAAI,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC;QACxB,SAAS,EAAE,KAAK;QAChB,yEAAyE;QACzE,WAAW,EAAE,iCAAiC;QAC9C,wEAAwE;QACxE,2CAA2C;QAC3C,cAAc,EAAE;YACd,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,QAAQ;SAClB;QACD,WAAW,EACT,mGAAmG;YACnG,mFAAmF;KACtF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,UAAU;QACnB,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,+DAA+D;KAC7E;CACF,CAAC"}
1
+ {"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/adapters/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,CAAC,iBAAiB,CAAC;QACzB,cAAc,EAAE;YACd,OAAO,EAAE,iBAAiB;SAC3B;QACD,WAAW,EAAE,qBAAqB;KACnC;IACD;QACE,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,KAAK,EAAE,sBAAsB,CAAC;QACrC,SAAS,EAAE,KAAK;QAChB,sDAAsD;QACtD,WAAW,EAAE,yCAAyC;QACtD,WAAW,EAAE,qDAAqD;KACnE;IACD,2EAA2E;IAC3E,2EAA2E;IAC3E,2CAA2C;IAC3C;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,mBAAmB;QAC5B,wEAAwE;QACxE,qEAAqE;QACrE,YAAY;QACZ,IAAI,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC;QACxB,SAAS,EAAE,KAAK;QAChB,yEAAyE;QACzE,WAAW,EAAE,iCAAiC;QAC9C,wEAAwE;QACxE,2CAA2C;QAC3C,cAAc,EAAE;YACd,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,QAAQ;SAClB;QACD,WAAW,EACT,mGAAmG;YACnG,mFAAmF;KACtF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,UAAU;QACnB,IAAI,EAAE,EAAE;QACR,WAAW,EAAE,+DAA+D;KAC7E;IACD,sEAAsE;IACtE,kEAAkE;IAClE,yEAAyE;IACzE,sBAAsB;IACtB;QACE,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,EAAE;QACR,wEAAwE;QACxE,wEAAwE;QACxE,2BAA2B;QAC3B,cAAc,EAAE;YACd,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE;gBACX,qBAAqB;gBACrB,iCAAiC;gBACjC,gCAAgC;gBAChC,2BAA2B;aAC5B;SACF;QACD,WAAW,EACT,sGAAsG;YACtG,iFAAiF;KACpF;CACF,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2026 Ivan Iraci <ivan.iraci@professioneit.com>
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+ import { AdapterConfig } from "../dap/types.js";
23
+ export interface LaunchArgOptions {
24
+ program?: string;
25
+ args?: string[];
26
+ cwd?: string;
27
+ env?: Record<string, string>;
28
+ /** Adapter-specific launch fields, merged below the explicit common options. */
29
+ launchConfig?: Record<string, unknown>;
30
+ stopOnEntry: boolean;
31
+ /** Source files the session will break in; selects language-specific recipes. */
32
+ sourceFiles?: string[];
33
+ }
34
+ /**
35
+ * Build the DAP launch arguments shared by debug_launch, debug_inspect/debug_at
36
+ * and debug_run. Merge order: adapter launchDefaults < launchConfig < explicit
37
+ * common fields, then per-adapter recipes that a caller would otherwise have
38
+ * to know by heart.
39
+ */
40
+ export declare function buildLaunchArgs(config: AdapterConfig, opts: LaunchArgOptions, resolveRustSysroot?: () => Promise<string | undefined>): Promise<Record<string, unknown>>;
41
+ /** `target/debug/<package name>` of the Cargo project in cwd, once it has been built. */
42
+ export declare function defaultCargoProgram(cwd: string): Promise<string | undefined>;
43
+ /** Why a program may have run to completion without the debugger ever binding a breakpoint. */
44
+ export declare function launchFailureHint(adapterType: string): string | undefined;
45
+ /** How to get a first stop with this language/adapter; surfaced by debug_doctor. */
46
+ export declare function adapterUsageNote(languageOrAdapter: string): string | undefined;
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Copyright (c) 2026 Ivan Iraci <ivan.iraci@professioneit.com>
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+ import { execFile } from "node:child_process";
23
+ import fs from "node:fs/promises";
24
+ import path from "node:path";
25
+ import { promisify } from "node:util";
26
+ const execFileAsync = promisify(execFile);
27
+ async function exists(filePath) {
28
+ try {
29
+ await fs.access(filePath);
30
+ return true;
31
+ }
32
+ catch {
33
+ return false;
34
+ }
35
+ }
36
+ let rustSysroot;
37
+ function findRustSysroot() {
38
+ rustSysroot ??= execFileAsync("rustc", ["--print", "sysroot"])
39
+ .then(({ stdout }) => stdout.trim() || undefined)
40
+ .catch(() => undefined);
41
+ return rustSysroot;
42
+ }
43
+ /**
44
+ * The LLDB commands `rust-lldb` runs before loading a binary. Without them
45
+ * lldb-dap shows `String`, `&str`, `Vec` and `HashMap` as raw structs.
46
+ */
47
+ async function rustFormatterCommands(sysroot) {
48
+ if (!sysroot)
49
+ return [];
50
+ const etc = path.join(sysroot, "lib", "rustlib", "etc");
51
+ const lookup = path.join(etc, "lldb_lookup.py");
52
+ if (!(await exists(lookup)))
53
+ return [];
54
+ const commands = [`command script import "${lookup}"`];
55
+ // Older toolchains register the type summaries from a separate command file.
56
+ const legacyCommands = path.join(etc, "lldb_commands");
57
+ if (await exists(legacyCommands))
58
+ commands.push(`command source -s 0 "${legacyCommands}"`);
59
+ return commands;
60
+ }
61
+ /**
62
+ * Build the DAP launch arguments shared by debug_launch, debug_inspect/debug_at
63
+ * and debug_run. Merge order: adapter launchDefaults < launchConfig < explicit
64
+ * common fields, then per-adapter recipes that a caller would otherwise have
65
+ * to know by heart.
66
+ */
67
+ export async function buildLaunchArgs(config, opts, resolveRustSysroot = findRustSysroot) {
68
+ const launchArgs = {
69
+ ...config.launchDefaults,
70
+ ...opts.launchConfig,
71
+ stopOnEntry: opts.stopOnEntry,
72
+ };
73
+ if (opts.program !== undefined)
74
+ launchArgs.program = opts.program;
75
+ if (opts.args !== undefined)
76
+ launchArgs.args = opts.args;
77
+ if (opts.cwd !== undefined)
78
+ launchArgs.cwd = opts.cwd;
79
+ if (opts.env !== undefined)
80
+ launchArgs.env = opts.env;
81
+ // delve's `cwd` is the debuggee's working directory; the *build* (go build)
82
+ // runs from delve's own process cwd, controlled by `dlvCwd`. Mirror
83
+ // cwd → dlvCwd so a user-supplied cwd is found by `go build` looking for go.mod.
84
+ if (config.type === "go" && opts.cwd !== undefined && launchArgs.dlvCwd === undefined) {
85
+ launchArgs.dlvCwd = opts.cwd;
86
+ }
87
+ const involvesRust = (opts.sourceFiles ?? []).some((file) => path.extname(file).toLowerCase() === ".rs");
88
+ if (config.type === "cppdbg" && involvesRust) {
89
+ const existing = Array.isArray(launchArgs.initCommands)
90
+ ? launchArgs.initCommands.map(String)
91
+ : [];
92
+ if (!existing.some((command) => command.includes("lldb_lookup"))) {
93
+ const formatters = await rustFormatterCommands(await resolveRustSysroot());
94
+ if (formatters.length > 0)
95
+ launchArgs.initCommands = [...existing, ...formatters];
96
+ }
97
+ }
98
+ return launchArgs;
99
+ }
100
+ /** `target/debug/<package name>` of the Cargo project in cwd, once it has been built. */
101
+ export async function defaultCargoProgram(cwd) {
102
+ const manifest = await fs.readFile(path.join(cwd, "Cargo.toml"), "utf8").catch(() => undefined);
103
+ const name = manifest?.match(/^\s*\[package\][^[]*?^\s*name\s*=\s*"([^"]+)"/ms)?.[1];
104
+ if (!name)
105
+ return undefined;
106
+ const binary = path.join(cwd, "target", "debug", process.platform === "win32" ? `${name}.exe` : name);
107
+ return (await exists(binary)) ? binary : undefined;
108
+ }
109
+ const LAUNCH_FAILURE_HINTS = {
110
+ php: "PHP ran without xdebug connecting to the adapter. Check that xdebug 3 is loaded in the CLI (php -m | grep -i xdebug) " +
111
+ "and that launchConfig.runtimeArgs still enables it (-dxdebug.mode=debug -dxdebug.start_with_request=yes).",
112
+ };
113
+ /** Why a program may have run to completion without the debugger ever binding a breakpoint. */
114
+ export function launchFailureHint(adapterType) {
115
+ return LAUNCH_FAILURE_HINTS[adapterType];
116
+ }
117
+ const ADAPTER_USAGE_NOTES = {
118
+ cppdbg: "Compile with debug info (-g -O0) and pass the executable as program.",
119
+ rust: "Build with `cargo build`; debug_at defaults program to target/debug/<package name> and loads the Rust LLDB formatters.",
120
+ php: "Needs xdebug 3 in the PHP CLI; the xdebug runtimeArgs are supplied by the adapter's launchDefaults.",
121
+ java: "Start the JVM with -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:5005, " +
122
+ "then call debug_attach with port and breakpoints so they bind before the VM resumes.",
123
+ };
124
+ /** How to get a first stop with this language/adapter; surfaced by debug_doctor. */
125
+ export function adapterUsageNote(languageOrAdapter) {
126
+ return ADAPTER_USAGE_NOTES[languageOrAdapter];
127
+ }
128
+ //# sourceMappingURL=recipes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipes.js","sourceRoot":"","sources":["../../src/adapters/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAc1C,KAAK,UAAU,MAAM,CAAC,QAAgB;IACpC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,C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QACnG,sFAAsF;CACzF,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,gBAAgB,CAAC,iBAAyB;IACxD,OAAO,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAChD,CAAC"}
@@ -54,7 +54,27 @@ export interface StoppedState {
54
54
  name: string;
55
55
  variables: Variable[];
56
56
  }>;
57
+ /** Scopes the adapter offers but that were not fetched (e.g. CPU registers). */
58
+ omittedScopes?: string[];
59
+ /** Present when `reason` is "exception". */
60
+ exception?: ExceptionDetails;
61
+ /** Output not yet reported by an earlier state, newest entries last. */
57
62
  output?: string[];
63
+ /** Number of older unreported entries dropped from `output`; get_output has them. */
64
+ outputOmitted?: number;
65
+ }
66
+ export interface ExceptionDetails {
67
+ id?: string;
68
+ description?: string;
69
+ breakMode?: string;
70
+ }
71
+ export interface CollectStateOptions {
72
+ /** Scope names to fetch (case-insensitive). Default: every scope except CPU registers. */
73
+ scopes?: string[];
74
+ /** Also skip global/static/expensive scopes; used by compact responses. */
75
+ localsOnly?: boolean;
76
+ /** Mark the returned output as reported, so the next state only carries newer output. */
77
+ consumeOutput?: boolean;
58
78
  }
59
79
  export interface RunningState {
60
80
  status: "running";
@@ -45,7 +45,10 @@ export interface DoctorResult {
45
45
  ready: boolean;
46
46
  recommendedAdapter?: string;
47
47
  detected: ProjectSignals;
48
+ /** The selected adapter only, unless the caller asked for a verbose report. */
48
49
  adapters: DoctorAdapter[];
50
+ /** Compact roster of the adapters left out of `adapters`, e.g. "go (missing)". */
51
+ otherAdapters?: string[];
49
52
  nextSteps: string[];
50
53
  }
51
54
  export interface ResolvedProjectAdapter {
@@ -58,7 +61,10 @@ export declare function resolveProjectAdapter(registry: AdapterRegistry, options
58
61
  adapter?: string;
59
62
  sourceFile?: string;
60
63
  }): Promise<ResolvedProjectAdapter>;
64
+ /** Drop the per-adapter detail an agent rarely needs, keeping a one-line roster. */
65
+ export declare function conciseDoctorResult(result: DoctorResult): DoctorResult;
61
66
  export declare function runDebugDoctor(registry: AdapterRegistry, options?: {
62
67
  cwd?: string;
63
68
  adapter?: string;
69
+ verbose?: boolean;
64
70
  }): Promise<DoctorResult>;
@@ -22,6 +22,7 @@
22
22
  import fs from "node:fs/promises";
23
23
  import path from "node:path";
24
24
  import { inspectAdapterAvailability } from "../adapters/detect.js";
25
+ import { adapterUsageNote } from "../adapters/recipes.js";
25
26
  async function exists(filePath) {
26
27
  try {
27
28
  await fs.access(filePath);
@@ -57,31 +58,80 @@ function packageNames(pkg) {
57
58
  }
58
59
  return names;
59
60
  }
61
+ const EXTENSION_LANGUAGES = {
62
+ ".py": "python",
63
+ ".js": "node",
64
+ ".jsx": "node",
65
+ ".mjs": "node",
66
+ ".cjs": "node",
67
+ ".ts": "node",
68
+ ".tsx": "node",
69
+ ".go": "go",
70
+ ".c": "cppdbg",
71
+ ".cc": "cppdbg",
72
+ ".cpp": "cppdbg",
73
+ ".cxx": "cppdbg",
74
+ ".h": "cppdbg",
75
+ ".hpp": "cppdbg",
76
+ ".rs": "rust",
77
+ ".php": "php",
78
+ ".java": "java",
79
+ };
80
+ const MANIFEST_LANGUAGES = [
81
+ ["pyproject.toml", "python"],
82
+ ["requirements.txt", "python"],
83
+ ["setup.py", "python"],
84
+ ["go.mod", "go"],
85
+ ["Cargo.toml", "rust"],
86
+ ["composer.json", "php"],
87
+ ["pom.xml", "java"],
88
+ ["build.gradle", "java"],
89
+ ["build.gradle.kts", "java"],
90
+ ["CMakeLists.txt", "cppdbg"],
91
+ ];
92
+ /** Languages debugged through an adapter whose type differs from the language name. */
93
+ const LANGUAGE_ADAPTERS = {
94
+ rust: "cppdbg",
95
+ };
96
+ function languageOf(filePath) {
97
+ return EXTENSION_LANGUAGES[path.extname(filePath).toLowerCase()];
98
+ }
99
+ /**
100
+ * Fallback for manifest-less projects (scripts, pet projects): rank languages
101
+ * by how many source files sit in cwd and cwd/src.
102
+ */
103
+ async function looseSourceLanguages(cwd) {
104
+ const counts = new Map();
105
+ for (const dir of [cwd, path.join(cwd, "src")]) {
106
+ const entries = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);
107
+ for (const entry of entries) {
108
+ const language = entry.isFile() ? languageOf(entry.name) : undefined;
109
+ if (language)
110
+ counts.set(language, (counts.get(language) ?? 0) + 1);
111
+ }
112
+ }
113
+ return Array.from(counts.entries())
114
+ .sort((a, b) => b[1] - a[1])
115
+ .map(([language]) => language);
116
+ }
60
117
  export async function detectProjectSignals(cwd, sourceFile) {
61
118
  const languages = new Set();
62
119
  const testFrameworks = new Set();
63
- const extension = sourceFile ? path.extname(sourceFile).toLowerCase() : "";
64
- if (extension === ".py")
65
- languages.add("python");
66
- if ([".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx"].includes(extension)) {
67
- languages.add("node");
120
+ const sourceLanguage = sourceFile ? languageOf(sourceFile) : undefined;
121
+ if (sourceLanguage)
122
+ languages.add(sourceLanguage);
123
+ for (const [manifest, language] of MANIFEST_LANGUAGES) {
124
+ if (await exists(path.join(cwd, manifest)))
125
+ languages.add(language);
68
126
  }
69
- if (extension === ".go")
70
- languages.add("go");
71
- if ([".c", ".cc", ".cpp", ".cxx", ".h", ".hpp"].includes(extension)) {
72
- languages.add("cppdbg");
73
- }
74
- if ((await exists(path.join(cwd, "pyproject.toml"))) ||
75
- (await exists(path.join(cwd, "requirements.txt"))) ||
76
- (await exists(path.join(cwd, "setup.py")))) {
77
- languages.add("python");
78
- }
79
- if (await exists(path.join(cwd, "go.mod")))
80
- languages.add("go");
81
127
  const pkg = await readPackageJson(cwd);
82
128
  const deps = packageNames(pkg);
83
129
  if (pkg)
84
130
  languages.add("node");
131
+ if (languages.size === 0) {
132
+ for (const language of await looseSourceLanguages(cwd))
133
+ languages.add(language);
134
+ }
85
135
  if (deps.has("vitest"))
86
136
  testFrameworks.add("vitest");
87
137
  if (deps.has("jest") || deps.has("@jest/core"))
@@ -122,16 +172,8 @@ async function resolveNodeProgram(cwd) {
122
172
  ]);
123
173
  }
124
174
  function preferredAdapter(signals, sourceFile) {
125
- const extension = sourceFile ? path.extname(sourceFile).toLowerCase() : "";
126
- if (extension === ".py")
127
- return "python";
128
- if ([".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx"].includes(extension))
129
- return "node";
130
- if (extension === ".go")
131
- return "go";
132
- if ([".c", ".cc", ".cpp", ".cxx", ".h", ".hpp"].includes(extension))
133
- return "cppdbg";
134
- return signals.languages[0];
175
+ const language = (sourceFile ? languageOf(sourceFile) : undefined) ?? signals.languages[0];
176
+ return language ? LANGUAGE_ADAPTERS[language] ?? language : undefined;
135
177
  }
136
178
  export async function resolveProjectAdapter(registry, options = {}) {
137
179
  const cwd = path.resolve(options.cwd ?? process.cwd());
@@ -188,6 +230,13 @@ export async function resolveProjectAdapter(registry, options = {}) {
188
230
  nextSteps.push(`Install debugpy in the project environment: ${detected.pythonPath} -m pip install debugpy`);
189
231
  }
190
232
  }
233
+ if (selected?.available) {
234
+ // Rust rides on cppdbg, so look the note up by language before adapter.
235
+ const language = detected.languages.find((name) => (LANGUAGE_ADAPTERS[name] ?? name) === selected.type && adapterUsageNote(name));
236
+ const note = adapterUsageNote(language ?? selected.type);
237
+ if (note)
238
+ nextSteps.push(note);
239
+ }
191
240
  if (detected.launchJson) {
192
241
  nextSteps.push(`A launch configuration is available at ${detected.launchJson}; pass its adapter-specific fields through launchConfig when needed.`);
193
242
  }
@@ -203,7 +252,17 @@ export async function resolveProjectAdapter(registry, options = {}) {
203
252
  config: recommendedAdapter ? configs.get(recommendedAdapter) : undefined,
204
253
  };
205
254
  }
255
+ /** Drop the per-adapter detail an agent rarely needs, keeping a one-line roster. */
256
+ export function conciseDoctorResult(result) {
257
+ const others = result.adapters.filter((adapter) => !adapter.selected);
258
+ return {
259
+ ...result,
260
+ adapters: result.adapters.filter((adapter) => adapter.selected),
261
+ otherAdapters: others.map((adapter) => adapter.available ? adapter.type : `${adapter.type} (missing)`),
262
+ };
263
+ }
206
264
  export async function runDebugDoctor(registry, options = {}) {
207
- return (await resolveProjectAdapter(registry, options)).result;
265
+ const { result } = await resolveProjectAdapter(registry, options);
266
+ return options.verbose ? result : conciseDoctorResult(result);
208
267
  }
209
268
  //# sourceMappingURL=doctor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/diagnostics/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAsCnE,KAAK,UAAU,MAAM,CAAC,QAAgB;IACpC,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,KAAe;IAC1C,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,CAAC;QAC9B,IAAI,MAAM,MAAM,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAC;IAChD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAW;IACxC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,GAAwC;IAC5D,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,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