{"record":{"id":"de706634cd3f99e0","repo":"zed-industries/zed","slug":"couldn-t-get-worktree-path","errorCode":null,"errorMessage":"Couldn't get worktree path","messagePattern":"Couldn't get worktree path","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/debugger_ui/src/debugger_panel.rs","lineNumber":1151,"sourceCode":"            })?;\n\n            Ok(())\n        })\n    }\n\n    pub(crate) fn save_scenario(\n        &self,\n        scenario: DebugScenario,\n        worktree_id: WorktreeId,\n        window: &mut Window,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<()>> {\n        let this = cx.weak_entity();\n        let project = self.project.clone();\n        self.workspace\n            .update(cx, |workspace, cx| {\n                let Some(mut path) = workspace.absolute_path_of_worktree(worktree_id, cx) else {\n                    return Task::ready(Err(anyhow!(\"Couldn't get worktree path\")));\n                };\n\n                let serialized_scenario = serde_json::to_value(scenario);\n\n                cx.spawn_in(window, async move |workspace, cx| {\n                    let serialized_scenario = serialized_scenario?;\n                    let fs =\n                        workspace.read_with(cx, |workspace, _| workspace.app_state().fs.clone())?;\n\n                    path.push(paths::local_settings_folder_name());\n                    if !fs.is_dir(path.as_path()).await {\n                        fs.create_dir(path.as_path()).await?;\n                    }\n                    path.pop();\n\n                    path.push(paths::local_debug_file_relative_path().as_std_path());\n                    let path = path.as_path();\n","sourceCodeStart":1133,"sourceCodeEnd":1169,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/debugger_ui/src/debugger_panel.rs#L1133-L1169","documentation":"save_scenario asks the workspace for the absolute path of the worktree (needed to locate the task definition file); absolute_path_of_worktree returned None, typically because the worktree no longer exists in the workspace. The worktree_id parameter is the input at fault.","triggerScenarios":"Thrown at crates/debugger_ui/src/debugger_panel.rs:1151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the worktree is still open in the workspace","Retry from a panel state where the owning worktree is present"],"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-14T00:17:10.932Z"}