1syntax = "proto3";
2package zed.messages;
3
4import "core.proto";
5import "buffer.proto";
6import "task.proto";
7
8enum BreakpointState {
9 Enabled = 0;
10 Disabled = 1;
11}
12
13message Breakpoint {
14 Anchor position = 1;
15 BreakpointState state = 2;
16 reserved 3;
17 optional string message = 4;
18 optional string condition = 5;
19 optional string hit_condition = 6;
20 map<uint64, BreakpointSessionState> session_state = 7;
21}
22
23message BreakpointSessionState {
24 uint64 id = 1;
25 bool verified = 2;
26}
27
28message BreakpointsForFile {
29 uint64 project_id = 1;
30 string path = 2;
31 repeated Breakpoint breakpoints = 3;
32}
33
34message ToggleBreakpoint {
35 uint64 project_id = 1;
36 string path = 2;
37 Breakpoint breakpoint = 3;
38}
39
40enum DapThreadStatus {
41 Running = 0;
42 Stopped = 1;
43 Exited = 2;
44 Ended = 3;
45}
46
47enum VariablesArgumentsFilter {
48 Indexed = 0;
49 Named = 1;
50}
51
52message ValueFormat {
53 optional bool hex = 1;
54}
55
56message VariablesRequest {
57 uint64 project_id = 1;
58 uint64 client_id = 2;
59 uint64 variables_reference = 3;
60 optional VariablesArgumentsFilter filter = 4;
61 optional uint64 start = 5;
62 optional uint64 count = 6;
63 optional ValueFormat format = 7;
64}
65
66enum SteppingGranularity {
67 Statement = 0;
68 Line = 1;
69 Instruction = 2;
70}
71
72message DapLocationsRequest {
73 uint64 project_id = 1;
74 uint64 session_id = 2;
75 uint64 location_reference = 3;
76}
77
78message DapLocationsResponse {
79 DapSource source = 1;
80 uint64 line = 2;
81 optional uint64 column = 3;
82 optional uint64 end_line = 4;
83 optional uint64 end_column = 5;
84}
85
86enum DapEvaluateContext {
87 Repl = 0;
88 Watch = 1;
89 Hover = 2;
90 Clipboard = 3;
91 EvaluateVariables = 4;
92 EvaluateUnknown = 5;
93}
94
95message DapEvaluateRequest {
96 uint64 project_id = 1;
97 uint64 client_id = 2;
98 string expression = 3;
99 optional uint64 frame_id = 4;
100 optional DapEvaluateContext context = 5;
101}
102
103message DapEvaluateResponse {
104 string result = 1;
105 optional string evaluate_type = 2;
106 uint64 variable_reference = 3;
107 optional uint64 named_variables = 4;
108 optional uint64 indexed_variables = 5;
109 optional string memory_reference = 6;
110}
111
112
113message DapCompletionRequest {
114 uint64 project_id = 1;
115 uint64 client_id = 2;
116 string query = 3;
117 optional uint64 frame_id = 4;
118 optional uint64 line = 5;
119 uint64 column = 6;
120}
121
122enum DapCompletionItemType {
123 Method = 0;
124 Function = 1;
125 Constructor = 2;
126 Field = 3;
127 Variable = 4;
128 Class = 5;
129 Interface = 6;
130 Module = 7;
131 Property = 8;
132 Unit = 9;
133 Value = 10;
134 Enum = 11;
135 Keyword = 12;
136 Snippet = 13;
137 Text = 14;
138 Color = 15;
139 CompletionItemFile = 16;
140 Reference = 17;
141 Customcolor = 19;
142}
143
144message DapCompletionItem {
145 string label = 1;
146 optional string text = 2;
147 optional string sort_text = 3;
148 optional string detail = 4;
149 optional DapCompletionItemType typ = 5;
150 optional uint64 start = 6;
151 optional uint64 length = 7;
152 optional uint64 selection_start = 8;
153 optional uint64 selection_length = 9;
154}
155
156message DapCompletionResponse {
157 uint64 client_id = 1;
158 repeated DapCompletionItem completions = 2;
159}
160
161message DapScopesRequest {
162 uint64 project_id = 1;
163 uint64 client_id = 2;
164 uint64 stack_frame_id = 3;
165}
166
167message DapScopesResponse {
168 repeated DapScope scopes = 1;
169}
170
171message DapSetVariableValueRequest {
172 uint64 project_id = 1;
173 uint64 client_id = 2;
174 string name = 3;
175 string value = 4;
176 uint64 variables_reference = 5;
177}
178
179message DapSetVariableValueResponse {
180 uint64 client_id = 1;
181 string value = 2;
182 optional string variable_type = 3;
183 optional uint64 variables_reference = 4;
184 optional uint64 named_variables = 5;
185 optional uint64 indexed_variables = 6;
186 optional string memory_reference = 7;
187}
188
189message DapPauseRequest {
190 uint64 project_id = 1;
191 uint64 client_id = 2;
192 int64 thread_id = 3;
193}
194
195message DapDisconnectRequest {
196 uint64 project_id = 1;
197 uint64 client_id = 2;
198 optional bool restart = 3;
199 optional bool terminate_debuggee = 4;
200 optional bool suspend_debuggee = 5;
201}
202
203message DapTerminateThreadsRequest {
204 uint64 project_id = 1;
205 uint64 client_id = 2;
206 repeated int64 thread_ids = 3;
207}
208
209message DapThreadsRequest {
210 uint64 project_id = 1;
211 uint64 client_id = 2;
212}
213
214message DapThreadsResponse {
215 repeated DapThread threads = 1;
216}
217
218message DapTerminateRequest {
219 uint64 project_id = 1;
220 uint64 client_id = 2;
221 optional bool restart = 3;
222}
223
224message DapRestartRequest {
225 uint64 project_id = 1;
226 uint64 client_id = 2;
227 bytes raw_args = 3;
228}
229
230message DapRestartStackFrameRequest {
231 uint64 project_id = 1;
232 uint64 client_id = 2;
233 uint64 stack_frame_id = 3;
234}
235
236message ToggleIgnoreBreakpoints {
237 uint64 project_id = 1;
238 uint32 session_id = 2;
239}
240
241message IgnoreBreakpointState {
242 uint64 project_id = 1;
243 uint64 session_id = 2;
244 bool ignore = 3;
245}
246
247message DapNextRequest {
248 uint64 project_id = 1;
249 uint64 client_id = 2;
250 int64 thread_id = 3;
251 optional bool single_thread = 4;
252 optional SteppingGranularity granularity = 5;
253}
254
255message DapStepInRequest {
256 uint64 project_id = 1;
257 uint64 client_id = 2;
258 int64 thread_id = 3;
259 optional uint64 target_id = 4;
260 optional bool single_thread = 5;
261 optional SteppingGranularity granularity = 6;
262}
263
264message DapStepOutRequest {
265 uint64 project_id = 1;
266 uint64 client_id = 2;
267 int64 thread_id = 3;
268 optional bool single_thread = 4;
269 optional SteppingGranularity granularity = 5;
270}
271
272message DapStepBackRequest {
273 uint64 project_id = 1;
274 uint64 client_id = 2;
275 int64 thread_id = 3;
276 optional bool single_thread = 4;
277 optional SteppingGranularity granularity = 5;
278}
279
280message DapContinueRequest {
281 uint64 project_id = 1;
282 uint64 client_id = 2;
283 int64 thread_id = 3;
284 optional bool single_thread = 4;
285}
286
287message DapContinueResponse {
288 uint64 client_id = 1;
289 optional bool all_threads_continued = 2;
290}
291
292message DapModulesRequest {
293 uint64 project_id = 1;
294 uint64 client_id = 2;
295}
296
297message DapModulesResponse {
298 uint64 client_id = 1;
299 repeated DapModule modules = 2;
300}
301
302message DapLoadedSourcesRequest {
303 uint64 project_id = 1;
304 uint64 client_id = 2;
305}
306
307message DapLoadedSourcesResponse {
308 uint64 client_id = 1;
309 repeated DapSource sources = 2;
310}
311
312message DapStackTraceRequest {
313 uint64 project_id = 1;
314 uint64 client_id = 2;
315 int64 thread_id = 3;
316 optional uint64 start_frame = 4;
317 optional uint64 stack_trace_levels = 5;
318}
319
320message DapStackTraceResponse {
321 repeated DapStackFrame frames = 1;
322}
323
324message DapStackFrame {
325 uint64 id = 1;
326 string name = 2;
327 optional DapSource source = 3;
328 uint64 line = 4;
329 uint64 column = 5;
330 optional uint64 end_line = 6;
331 optional uint64 end_column = 7;
332 optional bool can_restart = 8;
333 optional string instruction_pointer_reference = 9;
334 optional DapModuleId module_id = 10;
335 optional DapStackPresentationHint presentation_hint = 11;
336}
337
338message DebuggerLoadedSourceList {
339 uint64 client_id = 1;
340 repeated DapSource sources = 2;
341}
342
343message DapVariables {
344 uint64 client_id = 1;
345 repeated DapVariable variables = 2;
346}
347
348// Remote Debugging: Dap Types
349message DapVariable {
350 string name = 1;
351 string value = 2;
352 optional string type = 3;
353 // optional DapVariablePresentationHint presentation_hint = 4;
354 optional string evaluate_name = 5;
355 uint64 variables_reference = 6;
356 optional uint64 named_variables = 7;
357 optional uint64 indexed_variables = 8;
358 optional string memory_reference = 9;
359}
360
361message DapThread {
362 int64 id = 1;
363 string name = 2;
364}
365
366message DapScope {
367 string name = 1;
368 optional DapScopePresentationHint presentation_hint = 2;
369 uint64 variables_reference = 3;
370 optional uint64 named_variables = 4;
371 optional uint64 indexed_variables = 5;
372 bool expensive = 6;
373 optional DapSource source = 7;
374 optional uint64 line = 8;
375 optional uint64 column = 9;
376 optional uint64 end_line = 10;
377 optional uint64 end_column = 11;
378}
379
380message DapSource {
381 optional string name = 1;
382 optional string path = 2;
383 optional uint64 source_reference = 3;
384 optional DapSourcePresentationHint presentation_hint = 4;
385 optional string origin = 5;
386 repeated DapSource sources = 6;
387 optional bytes adapter_data = 7;
388 repeated DapChecksum checksums = 8;
389}
390
391enum DapOutputCategory {
392 ConsoleOutput = 0;
393 Important = 1;
394 Stdout = 2;
395 Stderr = 3;
396 Unknown = 4;
397}
398
399enum DapOutputEventGroup {
400 Start = 0;
401 StartCollapsed = 1;
402 End = 2;
403}
404
405message DapOutputEvent {
406 string output = 1;
407 optional DapOutputCategory category = 2;
408 optional uint64 variables_reference = 3;
409 optional DapOutputEventGroup group = 4;
410 optional DapSource source = 5;
411 optional uint32 line = 6;
412 optional uint32 column = 7;
413}
414
415enum DapChecksumAlgorithm {
416 CHECKSUM_ALGORITHM_UNSPECIFIED = 0;
417 MD5 = 1;
418 SHA1 = 2;
419 SHA256 = 3;
420 TIMESTAMP = 4;
421}
422
423message DapChecksum {
424 DapChecksumAlgorithm algorithm = 1;
425 string checksum = 2;
426}
427
428enum DapScopePresentationHint {
429 Arguments = 0;
430 Locals = 1;
431 Registers = 2;
432 ReturnValue = 3;
433 ScopeUnknown = 4;
434}
435
436enum DapSourcePresentationHint {
437 SourceNormal = 0;
438 Emphasize = 1;
439 Deemphasize = 2;
440 SourceUnknown = 3;
441}
442
443enum DapStackPresentationHint {
444 StackNormal = 0;
445 Label = 1;
446 Subtle = 2;
447 StackUnknown = 3;
448}
449message DapModule {
450 DapModuleId id = 1;
451 string name = 2;
452 optional string path = 3;
453 optional bool is_optimized = 4;
454 optional bool is_user_code = 5;
455 optional string version = 6;
456 optional string symbol_status = 7;
457 optional string symbol_file_path = 8;
458 optional string date_time_stamp = 9;
459 optional string address_range = 10;
460}
461
462message DebugTaskDefinition {
463 string adapter = 1;
464 string label = 2;
465 string config = 3;
466 optional TcpHost tcp_connection = 4;
467}
468
469message TcpHost {
470 optional uint32 port = 1;
471 optional string host = 2;
472 optional uint64 timeout = 3;
473}
474
475message DebugLaunchRequest {
476 string program = 1;
477 optional string cwd = 2;
478 repeated string args = 3;
479 map<string, string> env = 4;
480}
481
482message DebugAttachRequest {
483 uint32 process_id = 1;
484}
485
486message DapModuleId {
487 oneof id {
488 uint32 number = 1;
489 string string = 2;
490 }
491}
492
493message GetDebugAdapterBinary {
494 uint64 project_id = 1;
495 uint64 session_id = 3;
496 DebugTaskDefinition definition = 2;
497 uint64 worktree_id = 4;
498}
499
500message DebugAdapterBinary {
501 optional string command = 1;
502 repeated string arguments = 2;
503 map<string, string> envs = 3;
504 optional string cwd = 4;
505 optional TcpHost connection = 5;
506 string configuration = 7;
507 LaunchType launch_type = 8;
508 enum LaunchType {
509 Attach = 0;
510 Launch = 1;
511 }
512}
513
514message RunDebugLocators {
515 uint64 project_id = 1;
516 SpawnInTerminal build_command = 2;
517 string locator = 3;
518}
519
520message DebugRequest {
521 oneof request {
522 DebugLaunchRequest debug_launch_request = 1;
523 DebugAttachRequest debug_attach_request = 2;
524 }
525}
526
527message DebugScenario {
528 string label = 1;
529 string adapter = 2;
530 reserved 3;
531 DebugRequest request = 4;
532 optional TcpHost connection = 5;
533 optional bool stop_on_entry = 6;
534 optional string configuration = 7;
535}
536
537message LogToDebugConsole {
538 uint64 project_id = 1;
539 uint64 session_id = 2;
540 string message = 3;
541}
542
543message GetProcesses {
544 uint64 project_id = 1;
545}
546
547message GetProcessesResponse {
548 repeated ProcessInfo processes = 1;
549}
550
551message ProcessInfo {
552 uint32 pid = 1;
553 string name = 2;
554 repeated string command = 3;
555}