setBackend
Configure the debugging backend for Go programs by selecting from available options like default, native, lldb, or rr to enable code analysis and troubleshooting.
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)Executes the setBackend tool: validates the backend (default, native, lldb, rr), sets DELVE_BACKEND env var, and returns 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:359-372 (schema)Input schema definition for setBackend tool in ListTools response, requiring 'backend' with specific enum 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:416-418 (registration)In CallToolRequest handler, routes 'setBackend' calls to the handleConfigCommands function.if (["setBackend", "configureLogging", "version"].includes(name)) { return handleConfigCommands(name, args); }