-
Notifications
You must be signed in to change notification settings - Fork 78
/
debugProtocol.json
4368 lines (4264 loc) · 177 KB
/
debugProtocol.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Debug Adapter Protocol",
"description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.",
"type": "object",
"definitions": {
"ProtocolMessage": {
"type": "object",
"title": "Base Protocol",
"description": "Base class of requests, responses, and events.",
"properties": {
"seq": {
"type": "integer",
"description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request."
},
"type": {
"type": "string",
"description": "Message type.",
"_enum": [ "request", "response", "event" ]
}
},
"required": [ "seq", "type" ]
},
"Request": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "A client or debug adapter initiated request.",
"properties": {
"type": {
"type": "string",
"enum": [ "request" ]
},
"command": {
"type": "string",
"description": "The command to execute."
},
"arguments": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Object containing arguments for the command."
}
},
"required": [ "type", "command" ]
}]
},
"Event": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "A debug adapter initiated event.",
"properties": {
"type": {
"type": "string",
"enum": [ "event" ]
},
"event": {
"type": "string",
"description": "Type of event."
},
"body": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Event-specific information."
}
},
"required": [ "type", "event" ]
}]
},
"Response": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "Response for a request.",
"properties": {
"type": {
"type": "string",
"enum": [ "response" ]
},
"request_seq": {
"type": "integer",
"description": "Sequence number of the corresponding request."
},
"success": {
"type": "boolean",
"description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)."
},
"command": {
"type": "string",
"description": "The command requested."
},
"message": {
"type": "string",
"description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.",
"_enum": [ "cancelled", "notStopped" ],
"enumDescriptions": [
"the request was cancelled.",
"the request may be retried once the adapter is in a 'stopped' state."
]
},
"body": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Contains request result if success is true and error details if success is false."
}
},
"required": [ "type", "request_seq", "success", "command" ]
}]
},
"ErrorResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "On error (whenever `success` is false), the body can provide more details.",
"properties": {
"body": {
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/Message",
"description": "A structured error message."
}
}
}
},
"required": [ "body" ]
}]
},
"CancelRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence.\nClients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.\nThe `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.\nThe request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).\nReturning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.",
"properties": {
"command": {
"type": "string",
"enum": [ "cancel" ]
},
"arguments": {
"$ref": "#/definitions/CancelArguments"
}
},
"required": [ "command" ]
}]
},
"CancelArguments": {
"type": "object",
"description": "Arguments for `cancel` request.",
"properties": {
"requestId": {
"type": "integer",
"description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request."
},
"progressId": {
"type": "string",
"description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request."
}
}
},
"CancelResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required."
}]
},
"InitializedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"title": "Events",
"description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.",
"properties": {
"event": {
"type": "string",
"enum": [ "initialized" ]
}
},
"required": [ "event" ]
}]
},
"StoppedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.",
"properties": {
"event": {
"type": "string",
"enum": [ "stopped" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).",
"_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ]
},
"description": {
"type": "string",
"description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated."
},
"threadId": {
"type": "integer",
"description": "The thread which was stopped."
},
"preserveFocusHint": {
"type": "boolean",
"description": "A value of true hints to the client that this event should not change the focus."
},
"text": {
"type": "string",
"description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI."
},
"allThreadsStopped": {
"type": "boolean",
"description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded."
},
"hitBreakpointIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location."
}
},
"required": [ "reason" ]
}
},
"required": [ "event", "body" ]
}]
},
"ContinuedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.",
"properties": {
"event": {
"type": "string",
"enum": [ "continued" ]
},
"body": {
"type": "object",
"properties": {
"threadId": {
"type": "integer",
"description": "The thread which was continued."
},
"allThreadsContinued": {
"type": "boolean",
"description": "If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued."
}
},
"required": [ "threadId" ]
}
},
"required": [ "event", "body" ]
}]
},
"ExitedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the debuggee has exited and returns its exit code.",
"properties": {
"event": {
"type": "string",
"enum": [ "exited" ]
},
"body": {
"type": "object",
"properties": {
"exitCode": {
"type": "integer",
"description": "The exit code returned from the debuggee."
}
},
"required": [ "exitCode" ]
}
},
"required": [ "event", "body" ]
}]
},
"TerminatedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.",
"properties": {
"event": {
"type": "string",
"enum": [ "terminated" ]
},
"body": {
"type": "object",
"properties": {
"restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests."
}
}
}
},
"required": [ "event" ]
}]
},
"ThreadEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that a thread has started or exited.",
"properties": {
"event": {
"type": "string",
"enum": [ "thread" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"_enum": [ "started", "exited" ]
},
"threadId": {
"type": "integer",
"description": "The identifier of the thread."
}
},
"required": ["reason", "threadId"]
}
},
"required": [ "event", "body" ]
}]
},
"OutputEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the target has produced some output.",
"properties": {
"event": {
"type": "string",
"enum": [ "output" ]
},
"body": {
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.",
"_enum": [ "console", "important", "stdout", "stderr", "telemetry" ],
"enumDescriptions": [
"Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).",
"A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.",
"Show the output as normal program output from the debuggee.",
"Show the output as error program output from the debuggee.",
"Send the output to telemetry instead of showing it to the user."
]
},
"output": {
"type": "string",
"description": "The output to report.\n\nANSI escape sequences may be used to influence text color and styling if `supportsANSIStyling` is present in both the adapter's `Capabilities` and the client's `InitializeRequestArguments`. A client may strip any unrecognized ANSI sequences.\n\nIf the `supportsANSIStyling` capabilities are not both true, then the client should display the output literally."
},
"group": {
"type": "string",
"description": "Support for keeping an output log organized by grouping related messages.",
"enum": [ "start", "startCollapsed", "end" ],
"enumDescriptions": [
"Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.",
"Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.",
"End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group."
]
},
"variablesReference": {
"type": "integer",
"description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details."
},
"source": {
"$ref": "#/definitions/Source",
"description": "The source location where the output was produced."
},
"line": {
"type": "integer",
"description": "The source location's line where the output was produced."
},
"column": {
"type": "integer",
"description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based."
},
"data": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format."
},
"locationReference": {
"type": "integer",
"description": "A reference that allows the client to request the location where the new value is declared. For example, if the logged value is function pointer, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.\n\nThis reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details."
}
},
"required": ["output"]
}
},
"required": [ "event", "body" ]
}]
},
"BreakpointEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some information about a breakpoint has changed.",
"properties": {
"event": {
"type": "string",
"enum": [ "breakpoint" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"_enum": [ "changed", "new", "removed" ]
},
"breakpoint": {
"$ref": "#/definitions/Breakpoint",
"description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values."
}
},
"required": [ "reason", "breakpoint" ]
}
},
"required": [ "event", "body" ]
}]
},
"ModuleEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some information about a module has changed.",
"properties": {
"event": {
"type": "string",
"enum": [ "module" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"enum": [ "new", "changed", "removed" ]
},
"module": {
"$ref": "#/definitions/Module",
"description": "The new, changed, or removed module. In case of `removed` only the module id is used."
}
},
"required": [ "reason", "module" ]
}
},
"required": [ "event", "body" ]
}]
},
"LoadedSourceEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.",
"properties": {
"event": {
"type": "string",
"enum": [ "loadedSource" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"enum": [ "new", "changed", "removed" ]
},
"source": {
"$ref": "#/definitions/Source",
"description": "The new, changed, or removed source."
}
},
"required": [ "reason", "source" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProcessEvent": {
"allOf": [
{ "$ref": "#/definitions/Event" },
{
"type": "object",
"description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.",
"properties": {
"event": {
"type": "string",
"enum": [ "process" ]
},
"body": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js."
},
"systemProcessId": {
"type": "integer",
"description": "The process ID of the debugged process, as assigned by the operating system. This property should be omitted for logical processes that do not map to operating system processes on the machine."
},
"isLocalProcess": {
"type": "boolean",
"description": "If true, the process is running on the same computer as the debug adapter."
},
"startMethod": {
"type": "string",
"enum": [ "launch", "attach", "attachForSuspendedLaunch" ],
"description": "Describes how the debug engine started debugging this process.",
"enumDescriptions": [
"Process was launched under the debugger.",
"Debugger attached to an existing process.",
"A project launcher component has launched a new process in a suspended state and then asked the debugger to attach."
]
},
"pointerSize": {
"type": "integer",
"description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display."
}
},
"required": [ "name" ]
}
},
"required": [ "event", "body" ]
}
]
},
"CapabilitiesEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.",
"properties": {
"event": {
"type": "string",
"enum": [ "capabilities" ]
},
"body": {
"type": "object",
"properties": {
"capabilities": {
"$ref": "#/definitions/Capabilities",
"description": "The set of updated capabilities."
}
},
"required": [ "capabilities" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressStartEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressStart" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session."
},
"title": {
"type": "string",
"description": "Short title of the progress reporting. Shown in the UI to describe the long running operation."
},
"requestId": {
"type": "integer",
"description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter."
},
"cancellable": {
"type": "boolean",
"description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting."
},
"message": {
"type": "string",
"description": "More detailed progress message."
},
"percentage": {
"type": "number",
"description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown."
}
},
"required": [ "progressId", "title" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressUpdateEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressUpdate" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "The ID that was introduced in the initial `progressStart` event."
},
"message": {
"type": "string",
"description": "More detailed progress message. If omitted, the previous message (if any) is used."
},
"percentage": {
"type": "number",
"description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressEndEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressEnd" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "The ID that was introduced in the initial `ProgressStartEvent`."
},
"message": {
"type": "string",
"description": "More detailed progress message. If omitted, the previous message (if any) is used."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"InvalidatedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "invalidated" ]
},
"body": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.",
"items": {
"$ref": "#/definitions/InvalidatedAreas"
}
},
"threadId": {
"type": "integer",
"description": "If specified, the client only needs to refetch data related to this thread."
},
"stackFrameId": {
"type": "integer",
"description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)."
}
}
}
},
"required": [ "event", "body" ]
}]
},
"MemoryEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.\nDebug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.",
"properties": {
"event": {
"type": "string",
"enum": [ "memory" ]
},
"body": {
"type": "object",
"properties": {
"memoryReference": {
"type": "string",
"description": "Memory reference of a memory range that has been updated."
},
"offset": {
"type": "integer",
"description": "Starting offset in bytes where memory has been updated. Can be negative."
},
"count": {
"type": "integer",
"description": "Number of bytes updated."
}
},
"required": [ "memoryReference", "offset", "count" ]
}
},
"required": [ "event", "body" ]
}]
},
"RunInTerminalRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"title": "Reverse Requests",
"description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.",
"properties": {
"command": {
"type": "string",
"enum": [ "runInTerminal" ]
},
"arguments": {
"$ref": "#/definitions/RunInTerminalRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"RunInTerminalRequestArguments": {
"type": "object",
"description": "Arguments for `runInTerminal` request.",
"properties": {
"kind": {
"type": "string",
"enum": [ "integrated", "external" ],
"description": "What kind of terminal to launch. Defaults to `integrated` if not specified."
},
"title": {
"type": "string",
"description": "Title of the terminal."
},
"cwd": {
"type": "string",
"description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command."
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of arguments. The first argument is the command to run."
},
"env": {
"type": "object",
"description": "Environment key-value pairs that are added to or removed from the default environment.",
"additionalProperties": {
"type": [ "string", "null" ],
"description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment."
}
},
"argsCanBeInterpretedByShell": {
"type": "boolean",
"description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells."
}
},
"required": [ "args", "cwd" ]
},
"RunInTerminalResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `runInTerminal` request.",
"properties": {
"body": {
"type": "object",
"properties": {
"processId": {
"type": "integer",
"description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)."
},
"shellProcessId": {
"type": "integer",
"description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)."
}
}
}
},
"required": [ "body" ]
}]
},
"StartDebuggingRequest": {
"allOf": [
{
"$ref": "#/definitions/Request"
},
{
"type": "object",
"description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.",
"properties": {
"command": {
"type": "string",
"enum": [
"startDebugging"
]
},
"arguments": {
"$ref": "#/definitions/StartDebuggingRequestArguments"
}
},
"required": [
"command",
"arguments"
]
}
]
},
"StartDebuggingRequestArguments": {
"type": "object",
"description": "Arguments for `startDebugging` request.",
"properties": {
"configuration": {
"type": "object",
"additionalProperties": true,
"description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')."
},
"request": {
"type": "string",
"enum": [
"launch",
"attach"
],
"description": "Indicates whether the new debug session should be started with a `launch` or `attach` request."
}
},
"required": [
"configuration",
"request"
]
},
"StartDebuggingResponse": {
"allOf": [
{
"$ref": "#/definitions/Response"
},
{
"type": "object",
"description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required."
}
]
},
"InitializeRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"title": "Requests",
"description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.",
"properties": {
"command": {
"type": "string",
"enum": [ "initialize" ]
},
"arguments": {
"$ref": "#/definitions/InitializeRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"InitializeRequestArguments": {
"type": "object",
"description": "Arguments for `initialize` request.",
"properties": {
"clientID": {
"type": "string",
"description": "The ID of the client using this adapter."
},
"clientName": {
"type": "string",
"description": "The human-readable name of the client using this adapter."
},
"adapterID": {
"type": "string",
"description": "The ID of the debug adapter."
},
"locale": {
"type": "string",
"description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH."
},
"linesStartAt1": {
"type": "boolean",
"description": "If true all line numbers are 1-based (default)."
},
"columnsStartAt1": {
"type": "boolean",
"description": "If true all column numbers are 1-based (default)."
},
"pathFormat": {
"type": "string",
"_enum": [ "path", "uri" ],
"description": "Determines in what format paths are specified. The default is `path`, which is the native format."
},
"supportsVariableType": {
"type": "boolean",
"description": "Client supports the `type` attribute for variables."
},
"supportsVariablePaging": {
"type": "boolean",
"description": "Client supports the paging of variables."
},
"supportsRunInTerminalRequest": {
"type": "boolean",
"description": "Client supports the `runInTerminal` request."
},
"supportsMemoryReferences": {
"type": "boolean",
"description": "Client supports memory references."
},
"supportsProgressReporting": {
"type": "boolean",
"description": "Client supports progress reporting."
},
"supportsInvalidatedEvent": {
"type": "boolean",
"description": "Client supports the `invalidated` event."
},
"supportsMemoryEvent": {
"type": "boolean",
"description": "Client supports the `memory` event."
},
"supportsArgsCanBeInterpretedByShell": {
"type": "boolean",
"description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request."
},
"supportsStartDebuggingRequest": {
"type": "boolean",
"description": "Client supports the `startDebugging` request."
},
"supportsANSIStyling": {
"type": "boolean",
"description": "The client will interpret ANSI escape sequences in the display of `OutputEvent.output` and `Variable.value` fields when `Capabilities.supportsANSIStyling` is also enabled."
}
},
"required": [ "adapterID" ]
},
"InitializeResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `initialize` request.",
"properties": {
"body": {
"$ref": "#/definitions/Capabilities",
"description": "The capabilities of this debug adapter."
}
}
}]
},
"ConfigurationDoneRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "configurationDone" ]
},
"arguments": {
"$ref": "#/definitions/ConfigurationDoneArguments"
}
},
"required": [ "command" ]
}]
},
"ConfigurationDoneArguments": {
"type": "object",