{"record":{"id":"266bc80494345d1a","repo":"zed-industries/zed","slug":"missing-or-invalid-request-field-in-config-expe","errorCode":null,"errorMessage":"missing or invalid `request` field in config. Expected 'launch' or 'attach'","messagePattern":"missing or invalid `request` field in config\\. Expected 'launch' or 'attach'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/dap/src/adapters.rs","lineNumber":379,"sourceCode":"        cx: &mut AsyncApp,\n    ) -> Result<DebugAdapterBinary>;\n\n    /// Returns the language name of an adapter if it only supports one language\n    fn adapter_language_name(&self) -> Option<LanguageName> {\n        None\n    }\n\n    /// Extracts the kind (attach/launch) of debug configuration from the given JSON config.\n    /// This method should only return error when the kind cannot be determined for a given configuration;\n    /// in particular, it *should not* validate whether the request as a whole is valid, because that's best left to the debug adapter itself to decide.\n    async fn request_kind(\n        &self,\n        config: &serde_json::Value,\n    ) -> Result<StartDebuggingRequestArgumentsRequest> {\n        match config.get(\"request\") {\n            Some(val) if val == \"launch\" => Ok(StartDebuggingRequestArgumentsRequest::Launch),\n            Some(val) if val == \"attach\" => Ok(StartDebuggingRequestArgumentsRequest::Attach),\n            _ => Err(anyhow!(\n                \"missing or invalid `request` field in config. Expected 'launch' or 'attach'\"\n            )),\n        }\n    }\n\n    fn dap_schema(&self) -> serde_json::Value;\n\n    fn label_for_child_session(&self, _args: &StartDebuggingRequestArguments) -> Option<String> {\n        None\n    }\n\n    fn compact_child_session(&self) -> bool {\n        false\n    }\n\n    fn prefer_thread_name(&self) -> bool {\n        false\n    }","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/dap/src/adapters.rs#L361-L397","documentation":"request_kind reads the debug config JSON to classify it as 'launch' or 'attach'; if the `request` field is missing or holds another value, the kind cannot be determined and this validation error is returned. The task's debug configuration JSON is the input at fault.","triggerScenarios":"Thrown at crates/dap/src/adapters.rs:379 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set \"request\": \"launch\" or \"attach\" in the debug scenario/task JSON","Fix typos in the request field of the adapter config"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}