debugger: Do not include Rust in default value for sourceLanguages (CodeLLDB config) (#33670)

- **debugger: Update exception breakpoints list on capability update**
- **Do not prefill codelldb sourcelanguages by default**

Release Notes:

- debugger: CodeLLDB no longer enables pretty-printers for Rust by
default. This fixes pretty-printers for C++. This is a breaking change
for user-defined debug scenarios from debug.json; in order to enable
Rust pretty printing when using CodeLLDB, add `"sourceLanguages":
["rust"]` to your debug configuration. This change does not affect
scenarios automatically inferred by Zed.

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
This commit is contained in:
Piotr Osiewicz
2025-07-01 11:03:40 +00:00
committed by GitHub
co-authored by Anthony Eid
parent bff5d85ff4
commit 2caa19214b
6 changed files with 90 additions and 21 deletions
@@ -2,7 +2,7 @@ use anyhow::{Context as _, Result};
use async_trait::async_trait;
use dap::{DapLocator, DebugRequest, adapters::DebugAdapterName};
use gpui::SharedString;
use serde_json::Value;
use serde_json::{Value, json};
use smol::{
io::AsyncReadExt,
process::{Command, Stdio},
@@ -76,6 +76,13 @@ impl DapLocator for CargoLocator {
_ => {}
}
let config = if adapter.as_ref() == "CodeLLDB" {
json!({
"sourceLanguages": ["rust"]
})
} else {
Value::Null
};
Some(DebugScenario {
adapter: adapter.0.clone(),
label: resolved_label.to_string().into(),
@@ -83,7 +90,7 @@ impl DapLocator for CargoLocator {
task_template,
locator_name: Some(self.name()),
}),
config: serde_json::Value::Null,
config,
tcp_connection: None,
})
}