{"record":{"id":"d518b481e12644b8","repo":"can1357/oh-my-pi","slug":"no-debugger-adapter-available-installed-adapters","errorCode":null,"errorMessage":"No debugger adapter available. Installed adapters: ${getConfiguredAdapters(commandCwd)}","messagePattern":"No debugger adapter available\\. Installed adapters: (.+?)","errorType":"exception","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/debug.ts","lineNumber":750,"sourceCode":"\t\tconst timeoutSec = clampTimeout(\"debug\", params.timeout, this.session.settings.get(\"tools.maxTimeout\"));\n\t\tconst timeoutSignal = AbortSignal.timeout(timeoutSec * 1000);\n\t\tconst combinedSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;\n\t\tconst details: DebugToolDetails = { action: params.action, success: true };\n\t\tconst result = toolResult(details);\n\t\tswitch (params.action) {\n\t\t\tcase \"launch\": {\n\t\t\t\tif (!params.program) {\n\t\t\t\t\tthrow new ToolError(\"program is required for launch\");\n\t\t\t\t}\n\t\t\t\tconst commandCwd = params.cwd ? resolveToCwd(params.cwd, this.session.cwd) : this.session.cwd;\n\t\t\t\tconst program = resolveToCwd(params.program, commandCwd);\n\t\t\t\tconst programKind = await classifyLaunchProgram(program);\n\t\t\t\tconst selection = selectLaunchAdapter(program, commandCwd, params.adapter, programKind);\n\t\t\t\tif (selection.kind === \"unavailable\") {\n\t\t\t\t\tthrow new ToolError(formatAdapterUnavailable(selection.adapterName, selection.command, commandCwd));\n\t\t\t\t}\n\t\t\t\tif (selection.kind === \"none\") {\n\t\t\t\t\tthrow new ToolError(\n\t\t\t\t\t\t`No debugger adapter available. Installed adapters: ${getConfiguredAdapters(commandCwd)}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst { adapter } = selection;\n\t\t\t\tvalidateLaunchProgram(program, commandCwd, programKind, adapter);\n\t\t\t\tconst extraLaunchArguments = resolveLaunchOverrides(adapter, program, programKind);\n\t\t\t\tconst snapshot = await dapSessionManager.launch(\n\t\t\t\t\t{ adapter, program, args: params.args, cwd: commandCwd, extraLaunchArguments },\n\t\t\t\t\tcombinedSignal,\n\t\t\t\t\ttimeoutSec * 1000,\n\t\t\t\t);\n\t\t\t\tdetails.snapshot = snapshot;\n\t\t\t\tdetails.adapter = adapter.name;\n\t\t\t\treturn result.text(formatSessionSnapshot(snapshot).join(\"\\n\")).done();\n\t\t\t}\n\t\t\tcase \"attach\": {\n\t\t\t\tif (params.pid === undefined && params.port === undefined && !params.adapter) {\n\t\t\t\t\tthrow new ToolError(\"attach requires pid or port\");","sourceCodeStart":732,"sourceCodeEnd":768,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/debug.ts#L732-L768","documentation":"No debugger adapter could be selected at all for the launch: selectLaunchAdapter returned kind=\"none\" because no adapter applies to the program/language and none of the installed adapters were requested or eligible. The error lists the adapters that are actually configured in the workspace via getConfiguredAdapters so the caller can pick a valid one.","triggerScenarios":"Calling action=launch where no adapter matches the program type and no explicit adapter was given, or the explicitly requested adapter isn't among configured ones and nothing else fits.","commonSituations":"Debugging a language with no adapter configured (e.g. Rust/C++ with only debugpy installed); typo in the adapter name causing fallback selection to fail; fresh workspace with no DAP adapter config at all; adapter installed on machine but not registered in the workspace config.","solutions":["Install/configure an adapter for the language in the workspace DAP adapter config.","Pass a valid `adapter` name from the installed-adapters list in the message.","Check the adapter name for typos against the listed installed adapters.","If the language truly has no adapter, use a different debugging approach (e.g. run the program and inspect logs)."],"exampleFix":"// before\n{ \"action\": \"launch\", \"program\": \"./server.py\", \"adapter\": \"debugpyy\" } // typo, nothing matches\n// after\n{ \"action\": \"launch\", \"program\": \"./server.py\", \"adapter\": \"debugpy\" }","handlingStrategy":"fallback","validationCode":"const snap = await debugTool({ action: \"snapshot\" }); // or read workspace adapter config\nconst installed = snap.installedAdapters ?? [];\nif (!installed.includes(adapterName)) {\n  adapterName = installed[0]; // or configure the needed adapter first\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await debugTool({ action: \"launch\", program });\n} catch (e) {\n  if (String(e).includes(\"No debugger adapter available\")) {\n    // parse 'Installed adapters: [...]' from the message and configure/install one\n    throw new Error(\"configure a DAP adapter for this language first\");\n  }\n  throw e;\n}","preventionTips":["Ensure the workspace DAP adapter config registers an adapter per language you debug.","Validate adapter names against configured adapters before passing them.","Set up adapters as part of workspace/environment provisioning."],"tags":["debug","dap","adapter","configuration"],"backgroundTag":"no-debug-adapter-available","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}