-
Notifications
You must be signed in to change notification settings - Fork 131
/
debugAdapterProtocol.json
3815 lines (3716 loc) · 137 KB
/
debugAdapterProtocol.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 (also known as message ID). For protocol messages of type 'request' this ID 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 frontend and is not shown in the UI.\nSome predefined values exist.",
"_enum": [ "cancelled" ],
"enumDescriptions": [
"request was cancelled."
]
},
"body": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Contains request result if success is true and optional 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": "An optional, structured error message."
}
}
}
},
"required": [ "body" ]
}]
},
"CancelRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The 'cancel' request is used by the frontend 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. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor 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 frontend client has no generic way for detecting that a response is partial or not.\n The 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. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\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- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend 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 break point 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 must be translated."
},
"threadId": {
"type": "integer",
"description": "The thread which was stopped."
},
"preserveFocusHint": {
"type": "boolean",
"description": "A value of true hints to the frontend 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."
}
},
"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 front end 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, 'console' is assumed.",
"_enum": [ "console", "stdout", "stderr", "telemetry" ]
},
"output": {
"type": "string",
"description": "The output to report."
},
"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 decreases 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. The value should be less than or equal to 2147483647 (2^31 - 1)."
},
"source": {
"$ref": "#/definitions/Source",
"description": "An optional source location where the output was produced."
},
"line": {
"type": "integer",
"description": "An optional source location line where the output was produced."
},
"column": {
"type": "integer",
"description": "An optional source location column where the output was produced."
},
"data": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format."
}
},
"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 and 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 system process id of the debugged process. This property will be missing for non-system processes."
},
"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 frontend 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 frontend can only be expected to make a 'best effort' in honouring 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\nprovides 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 client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressStart" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "An ID that must 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": "Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation."
},
"requestId": {
"type": "number",
"description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit\nprogress 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 canceled 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": "Optional, more detailed progress message."
},
"percentage": {
"type": "number",
"description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown."
}
},
"required": [ "progressId", "title" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressUpdateEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals that the progress reporting needs to 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 client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.",
"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": "Optional, more detailed progress message. If omitted, the previous message (if any) is used."
},
"percentage": {
"type": "number",
"description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressEndEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.",
"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": "Optional, more detailed progress message. If omitted, the previous message (if any) is used."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"RunInTerminalRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"title": "Reverse Requests",
"description": "This optional 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 client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.",
"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."
},
"title": {
"type": "string",
"description": "Optional title of the terminal."
},
"cwd": {
"type": "string",
"description": "Working directory of the 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": "Proper values must be strings. A value of 'null' removes the variable from the environment."
}
}
},
"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" ]
}]
},
"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\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to 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 (frontend) client using this adapter."
},
"clientName": {
"type": "string",
"description": "The human readable name of the (frontend) client using this adapter."
},
"adapterID": {
"type": "string",
"description": "The ID of the debug adapter."
},
"locale": {
"type": "string",
"description": "The ISO-639 locale of the (frontend) 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 optional 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."
}
},
"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 optional 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 capability 'supportsConfigurationDoneRequest' is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "configurationDone" ]
},
"arguments": {
"$ref": "#/definitions/ConfigurationDoneArguments"
}
},
"required": [ "command" ]
}]
},
"ConfigurationDoneArguments": {
"type": "object",
"description": "Arguments for 'configurationDone' request."
},
"ConfigurationDoneResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required."
}]
},
"LaunchRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.",
"properties": {
"command": {
"type": "string",
"enum": [ "launch" ]
},
"arguments": {
"$ref": "#/definitions/LaunchRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"LaunchRequestArguments": {
"type": "object",
"description": "Arguments for 'launch' request. Additional attributes are implementation specific.",
"properties": {
"noDebug": {
"type": "boolean",
"description": "If noDebug is true the launch request should launch the program without enabling debugging."
},
"__restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact."
}
}
},
"LaunchResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required."
}]
},
"AttachRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.",
"properties": {
"command": {
"type": "string",
"enum": [ "attach" ]
},
"arguments": {
"$ref": "#/definitions/AttachRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"AttachRequestArguments": {
"type": "object",
"description": "Arguments for 'attach' request. Additional attributes are implementation specific.",
"properties": {
"__restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact."
}
}
},
"AttachResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'attach' request. This is just an acknowledgement, so no body field is required."
}]
},
"RestartRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.",
"properties": {
"command": {
"type": "string",
"enum": [ "restart" ]
},
"arguments": {
"$ref": "#/definitions/RestartArguments"
}
},
"required": [ "command" ]
}]
},
"RestartArguments": {
"type": "object",
"description": "Arguments for 'restart' request."
},
"RestartResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'restart' request. This is just an acknowledgement, so no body field is required."
}]
},
"DisconnectRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).",
"properties": {
"command": {
"type": "string",
"enum": [ "disconnect" ]
},
"arguments": {
"$ref": "#/definitions/DisconnectArguments"
}
},
"required": [ "command" ]
}]
},
"DisconnectArguments": {
"type": "object",
"description": "Arguments for 'disconnect' request.",
"properties": {
"restart": {
"type": "boolean",
"description": "A value of true indicates that this 'disconnect' request is part of a restart sequence."
},
"terminateDebuggee": {
"type": "boolean",
"description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true."
}
}
},
"DisconnectResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to 'disconnect' request. This is just an acknowledgement, so no body field is required."
}]
},
"TerminateRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "terminate" ]
},
"arguments": {
"$ref": "#/definitions/TerminateArguments"
}
},
"required": [ "command" ]
}]
},
"TerminateArguments": {
"type": "object",
"description": "Arguments for 'terminate' request.",
"properties": {
"restart": {
"type": "boolean",
"description": "A value of true indicates that this 'terminate' request is part of a restart sequence."
}
}
},