debugger: More tidy up for SSH (#28993)

Split `locator` out of DebugTaskDefinition to make it clearer when
location needs to happen.

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
Conrad Irwin 2025-04-21 10:00:03 -06:00 committed by GitHub
parent d13cd007a2
commit 9d35f0389d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 1146 additions and 884 deletions

View file

@ -508,7 +508,6 @@ enum DapStackPresentationHint {
Subtle = 2;
StackUnknown = 3;
}
message DapModule {
DapModuleId id = 1;
string name = 2;
@ -522,9 +521,62 @@ message DapModule {
optional string address_range = 10;
}
message DebugTaskDefinition {
string adapter = 1;
string label = 2;
oneof request {
DebugLaunchRequest debug_launch_request = 3;
DebugAttachRequest debug_attach_request = 4;
}
optional string initialize_args = 5;
optional TcpHost tcp_connection = 6;
optional bool stop_on_entry = 7;
}
message TcpHost {
optional uint32 port = 1;
optional string host = 2;
optional uint64 timeout = 3;
}
message DebugLaunchRequest {
string program = 1;
optional string cwd = 2;
repeated string args = 3;
}
message DebugAttachRequest {
uint32 process_id = 1;
}
message DapModuleId {
oneof id {
uint32 number = 1;
string string = 2;
}
}
message GetDebugAdapterBinary {
uint64 project_id = 1;
DebugTaskDefinition task = 2;
}
message DebugAdapterBinary {
string command = 1;
repeated string arguments = 2;
map<string, string> envs = 3;
optional string cwd = 4;
optional TcpHost connection = 5;
string configuration = 7;
LaunchType launch_type = 8;
enum LaunchType {
Attach = 0;
Launch = 1;
}
}
message RunDebugLocator {
uint64 project_id = 1;
string locator = 2;
DebugTaskDefinition task = 3;
}

View file

@ -380,7 +380,12 @@ message Envelope {
StopLanguageServers stop_language_servers = 336;
LspExtRunnables lsp_ext_runnables = 337;
LspExtRunnablesResponse lsp_ext_runnables_response = 338; // current max
LspExtRunnablesResponse lsp_ext_runnables_response = 338;
GetDebugAdapterBinary get_debug_adapter_binary = 339;
DebugAdapterBinary debug_adapter_binary = 340;
RunDebugLocator run_debug_locator = 341;
DebugTaskDefinition debug_task_definition = 342; // current max
}
reserved 87 to 88;

View file

@ -302,6 +302,10 @@ messages!(
(GitDiff, Background),
(GitDiffResponse, Background),
(GitInit, Background),
(GetDebugAdapterBinary, Background),
(DebugAdapterBinary, Background),
(RunDebugLocator, Background),
(DebugTaskDefinition, Background),
);
request_messages!(
@ -460,6 +464,8 @@ request_messages!(
(GitDiff, GitDiffResponse),
(GitInit, Ack),
(ToggleBreakpoint, Ack),
(GetDebugAdapterBinary, DebugAdapterBinary),
(RunDebugLocator, DebugTaskDefinition),
);
entity_messages!(
@ -579,6 +585,8 @@ entity_messages!(
GitInit,
BreakpointsForFile,
ToggleBreakpoint,
RunDebugLocator,
GetDebugAdapterBinary,
);
entity_messages!(