setBackend
Configure the debugging backend for Go programs within the Delve MCP server. Choose from default, native, lldb, or rr to tailor the debugging environment.
Instructions
Set the backend for debugging
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backend | Yes | Backend to use (default, native, lldb, or rr) |
Implementation Reference
- src/handlers/config.ts:11-24 (handler)The main handler logic for the 'setBackend' tool. It validates the backend parameter against allowed values (default, native, lldb, rr), sets the DELVE_BACKEND environment variable, and returns a confirmation message.case "setBackend": { const { backend } = args; if (!["default", "native", "lldb", "rr"].includes(backend)) { throw new Error("Invalid backend specified"); } process.env.DELVE_BACKEND = backend; return { content: [{ type: "text", text: `Set Delve backend to ${backend}` }] }; }
- src/server.ts:358-372 (schema)Input schema definition for the 'setBackend' tool, specifying the required 'backend' parameter with enumerated allowed values.{ name: "setBackend", description: "Set the backend for debugging", inputSchema: { type: "object", properties: { backend: { type: "string", description: "Backend to use (default, native, lldb, or rr)", enum: ["default", "native", "lldb", "rr"] } }, required: ["backend"] } },
- src/server.ts:415-418 (registration)Registration/dispatch logic in the main tool call handler that routes 'setBackend' calls to the handleConfigCommands function.// Configuration commands if (["setBackend", "configureLogging", "version"].includes(name)) { return handleConfigCommands(name, args); }