{"record":{"id":"23ca036941c93612","repo":"zed-industries/zed","slug":"dev-toggleinspector-is-only-available-in-debug-bu","errorCode":null,"errorMessage":"dev::ToggleInspector is only available in debug builds","messagePattern":"dev::ToggleInspector is only available in debug builds","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/inspector_ui/src/inspector_ui.rs","lineNumber":15,"sourceCode":"#[cfg(debug_assertions)]\nmod div_inspector;\n#[cfg(debug_assertions)]\nmod inspector;\n\n#[cfg(debug_assertions)]\npub use inspector::init;\n\n#[cfg(not(debug_assertions))]\npub fn init(_app_state: std::sync::Arc<workspace::AppState>, cx: &mut gpui::App) {\n    use std::any::TypeId;\n    use workspace::notifications::NotifyResultExt as _;\n\n    cx.on_action(|_: &zed_actions::dev::ToggleInspector, cx| {\n        Err::<(), anyhow::Error>(anyhow::anyhow!(\n            \"dev::ToggleInspector is only available in debug builds\"\n        ))\n        .notify_app_err(cx);\n    });\n\n    command_palette_hooks::CommandPaletteFilter::update_global(cx, |filter, _cx| {\n        filter.hide_action_types(&[TypeId::of::<zed_actions::dev::ToggleInspector>()]);\n    });\n}\n","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/inspector_ui/src/inspector_ui.rs#L1-L25","documentation":"Sentinel error registered as the dev::ToggleInspector action handler in release builds (no debug_assertions and no inspector feature). In that build the inspector UI is not compiled in, so invoking ToggleInspector from the command palette can only report that the feature is unavailable; it is a deliberate unavailability notice, not a fault. The action is also hidden from the command palette.","triggerScenarios":"Thrown at crates/inspector_ui/src/inspector_ui.rs:15 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a debug build or a Nightly release to get the inspector","Do not invoke dev::ToggleInspector in release builds; it is a development tool only"],"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"}