debugger: Start on tabless design (#27837)

![image](https://github.com/user-attachments/assets/1cd54b70-5457-4c64-95bd-45a7055ea165)

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
Piotr Osiewicz 2025-04-03 18:11:14 +02:00 committed by GitHub
parent 9986a21970
commit ece4a1cd7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1287 additions and 1092 deletions

View file

@ -78,10 +78,10 @@ impl DebugAdapter for LldbDebugAdapter {
match &config.request {
DebugRequestType::Attach(attach) => {
map.insert("pid".into(), attach.process_id.into());
map.insert("stopOnEntry".into(), config.stop_on_entry.into());
}
DebugRequestType::Launch(launch) => {
map.insert("program".into(), launch.program.clone().into());
map.insert("stopOnEntry".into(), config.stop_on_entry.into());
map.insert("args".into(), launch.args.clone().into());
map.insert(
"cwd".into(),

View file

@ -126,24 +126,31 @@ impl DebugAdapter for PythonDebugAdapter {
}
fn request_args(&self, config: &DebugTaskDefinition) -> Value {
let mut args = json!({
"request": match config.request {
DebugRequestType::Launch(_) => "launch",
DebugRequestType::Attach(_) => "attach",
},
"subProcess": true,
"redirectOutput": true,
});
let map = args.as_object_mut().unwrap();
match &config.request {
DebugRequestType::Launch(launch_config) => {
json!({
"program": launch_config.program,
"args": launch_config.args,
"subProcess": true,
"cwd": launch_config.cwd,
"redirectOutput": true,
"StopOnEntry": config.stop_on_entry,
})
DebugRequestType::Attach(attach) => {
map.insert("processId".into(), attach.process_id.into());
}
dap::DebugRequestType::Attach(attach_config) => {
json!({
"subProcess": true,
"redirectOutput": true,
"processId": attach_config.process_id
})
DebugRequestType::Launch(launch) => {
map.insert("program".into(), launch.program.clone().into());
map.insert("args".into(), launch.args.clone().into());
if let Some(stop_on_entry) = config.stop_on_entry {
map.insert("stopOnEntry".into(), stop_on_entry.into());
}
if let Some(cwd) = launch.cwd.as_ref() {
map.insert("cwd".into(), cwd.to_string_lossy().into_owned().into());
}
}
}
args
}
}