mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-29 20:11:13 +01:00
e27924a2d3
Fixes #48231 ## Problem When debugging Rust programs with CodeLLDB, panic breakpoints ("Rust: on panic") don't work unless `sourceLanguages: ["rust"]` is explicitly set in the debug configuration. Without this setting, CodeLLDB doesn't return the `rust_panic` exception filter, so the breakpoint shows `locations = 0 (pending)` and never triggers. ## Root Cause The Cargo locator correctly adds `sourceLanguages: ["rust"]` ([cargo.rs:97-100](https://github.com/zed-industries/zed/blob/main/crates/project/src/debugger/locators/cargo.rs#L97-L100)), but other code paths may not: - VSCode launch.json imports - Manual debug configurations ## Solution Auto-detect Rust binaries in `CodeLldbDebugAdapter::get_binary()` by checking if the program path contains `/target/debug/` or `/target/release/` (Cargo's standard output directories). If detected and `sourceLanguages` isn't already set, we automatically add `["rust"]`. Release Notes: - Fixed Rust panic breakpoints not working in debugger when using CodeLLDB with non-Cargo debug configurations