-
Notifications
You must be signed in to change notification settings - Fork 29.7k
/
debugProtocol.d.ts
2089 lines (1910 loc) · 90.8 KB
/
debugProtocol.d.ts
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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/** Declaration module describing the VS Code debug protocol.
Auto-generated from json schema. Do not edit manually.
*/
declare module DebugProtocol {
/** Base class of requests, responses, and events. */
export interface ProtocolMessage {
/** Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. */
seq: number;
/** Message type.
Values: 'request', 'response', 'event', etc.
*/
type: string;
}
/** A client or debug adapter initiated request. */
export interface Request extends ProtocolMessage {
// type: 'request';
/** The command to execute. */
command: string;
/** Object containing arguments for the command. */
arguments?: any;
}
/** A debug adapter initiated event. */
export interface Event extends ProtocolMessage {
// type: 'event';
/** Type of event. */
event: string;
/** Event-specific information. */
body?: any;
}
/** Response for a request. */
export interface Response extends ProtocolMessage {
// type: 'response';
/** Sequence number of the corresponding request. */
request_seq: number;
/** Outcome of the request.
If true, the request was successful and the 'body' attribute may contain the result of the request.
If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error').
*/
success: boolean;
/** The command requested. */
command: string;
/** Contains the raw error in short form if 'success' is false.
This raw error might be interpreted by the frontend and is not shown in the UI.
Some predefined values exist.
Values:
'cancelled': request was cancelled.
etc.
*/
message?: string;
/** Contains request result if success is true and optional error details if success is false. */
body?: any;
}
/** On error (whenever 'success' is false), the body can provide more details. */
export interface ErrorResponse extends Response {
body: {
/** An optional, structured error message. */
error?: Message;
};
}
/** Cancel request; value of command field is 'cancel'.
The 'cancel' request is used by the frontend in two situations:
- to indicate that it is no longer interested in the result produced by a specific request issued earlier
- to cancel a progress sequence. Clients should only call this request if the capability 'supportsCancelRequest' is true.
This 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.
The '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.
A frontend client should only call this request if the capability 'supportsCancelRequest' is true.
The request that got canceled 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').
Returning 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.
The progress that got cancelled still needs to send a 'progressEnd' event back.
A client should not assume that progress just got cancelled after sending the 'cancel' request.
*/
export interface CancelRequest extends Request {
// command: 'cancel';
arguments?: CancelArguments;
}
/** Arguments for 'cancel' request. */
export interface CancelArguments {
/** The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
Both a 'requestId' and a 'progressId' can be specified in one request.
*/
requestId?: number;
/** The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
Both a 'requestId' and a 'progressId' can be specified in one request.
*/
progressId?: string;
}
/** Response to 'cancel' request. This is just an acknowledgement, so no body field is required. */
export interface CancelResponse extends Response {
}
/** Event message for 'initialized' event type.
This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).
A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished).
The sequence of events/requests is as follows:
- adapters sends 'initialized' event (after the 'initialize' request has returned)
- frontend sends zero or more 'setBreakpoints' requests
- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)
- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)
- frontend sends other future configuration requests
- frontend sends one 'configurationDone' request to indicate the end of the configuration.
*/
export interface InitializedEvent extends Event {
// event: 'initialized';
}
/** Event message for 'stopped' event type.
The event indicates that the execution of the debuggee has stopped due to some condition.
This can be caused by a break point previously set, a stepping action has completed, by executing a debugger statement etc.
*/
export interface StoppedEvent extends Event {
// event: 'stopped';
body: {
/** The reason for the event.
For backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).
Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', 'function breakpoint', 'data breakpoint', etc.
*/
reason: string;
/** The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated. */
description?: string;
/** The thread which was stopped. */
threadId?: number;
/** A value of true hints to the frontend that this event should not change the focus. */
preserveFocusHint?: boolean;
/** Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI. */
text?: string;
/** If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.
- The client should use this information to enable that all threads can be expanded to access their stacktraces.
- If the attribute is missing or false, only the thread with the given threadId can be expanded.
*/
allThreadsStopped?: boolean;
};
}
/** Event message for 'continued' event type.
The event indicates that the execution of the debuggee has continued.
Please 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'.
It is only necessary to send a 'continued' event if there was no previous request that implied this.
*/
export interface ContinuedEvent extends Event {
// event: 'continued';
body: {
/** The thread which was continued. */
threadId: number;
/** If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued. */
allThreadsContinued?: boolean;
};
}
/** Event message for 'exited' event type.
The event indicates that the debuggee has exited and returns its exit code.
*/
export interface ExitedEvent extends Event {
// event: 'exited';
body: {
/** The exit code returned from the debuggee. */
exitCode: number;
};
}
/** Event message for 'terminated' event type.
The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.
*/
export interface TerminatedEvent extends Event {
// event: 'terminated';
body?: {
/** A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.
The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.
*/
restart?: any;
};
}
/** Event message for 'thread' event type.
The event indicates that a thread has started or exited.
*/
export interface ThreadEvent extends Event {
// event: 'thread';
body: {
/** The reason for the event.
Values: 'started', 'exited', etc.
*/
reason: string;
/** The identifier of the thread. */
threadId: number;
};
}
/** Event message for 'output' event type.
The event indicates that the target has produced some output.
*/
export interface OutputEvent extends Event {
// event: 'output';
body: {
/** The output category. If not specified, 'console' is assumed.
Values: 'console', 'stdout', 'stderr', 'telemetry', etc.
*/
category?: string;
/** The output to report. */
output: string;
/** Support for keeping an output log organized by grouping related messages.
'start': Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.
The 'output' attribute becomes the name of the group and is not indented.
'startCollapsed': 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).
The 'output' attribute becomes the name of the group and is not indented.
'end': End the current group and decreases the indentation of subsequent output events.
A non empty 'output' attribute is shown as the unindented end of the group.
*/
group?: 'start' | 'startCollapsed' | 'end';
/** 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). */
variablesReference?: number;
/** An optional source location where the output was produced. */
source?: Source;
/** An optional source location line where the output was produced. */
line?: number;
/** An optional source location column where the output was produced. */
column?: number;
/** 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. */
data?: any;
};
}
/** Event message for 'breakpoint' event type.
The event indicates that some information about a breakpoint has changed.
*/
export interface BreakpointEvent extends Event {
// event: 'breakpoint';
body: {
/** The reason for the event.
Values: 'changed', 'new', 'removed', etc.
*/
reason: string;
/** The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values. */
breakpoint: Breakpoint;
};
}
/** Event message for 'module' event type.
The event indicates that some information about a module has changed.
*/
export interface ModuleEvent extends Event {
// event: 'module';
body: {
/** The reason for the event. */
reason: 'new' | 'changed' | 'removed';
/** The new, changed, or removed module. In case of 'removed' only the module id is used. */
module: Module;
};
}
/** Event message for 'loadedSource' event type.
The event indicates that some source has been added, changed, or removed from the set of all loaded sources.
*/
export interface LoadedSourceEvent extends Event {
// event: 'loadedSource';
body: {
/** The reason for the event. */
reason: 'new' | 'changed' | 'removed';
/** The new, changed, or removed source. */
source: Source;
};
}
/** Event message for 'process' event type.
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.
*/
export interface ProcessEvent extends Event {
// event: 'process';
body: {
/** The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js. */
name: string;
/** The system process id of the debugged process. This property will be missing for non-system processes. */
systemProcessId?: number;
/** If true, the process is running on the same computer as the debug adapter. */
isLocalProcess?: boolean;
/** Describes how the debug engine started debugging this process.
'launch': Process was launched under the debugger.
'attach': Debugger attached to an existing process.
'attachForSuspendedLaunch': A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.
*/
startMethod?: 'launch' | 'attach' | 'attachForSuspendedLaunch';
/** The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display. */
pointerSize?: number;
};
}
/** Event message for 'capabilities' event type.
The event indicates that one or more capabilities have changed.
Since the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late).
Consequently 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.
Only changed capabilities need to be included, all other capabilities keep their values.
*/
export interface CapabilitiesEvent extends Event {
// event: 'capabilities';
body: {
/** The set of updated capabilities. */
capabilities: Capabilities;
};
}
/** Event message for 'progressStart' event type.
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.
The client is free to delay the showing of the UI in order to reduce flicker.
This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.
*/
export interface ProgressStartEvent extends Event {
// event: 'progressStart';
body: {
/** An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.
IDs must be unique within a debug session.
*/
progressId: string;
/** Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation. */
title: string;
/** 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.
If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.
*/
requestId?: number;
/** If true, the request that reports progress may be canceled with a 'cancel' request.
So this property basically controls whether the client should use UX that supports cancellation.
Clients that don't support cancellation are allowed to ignore the setting.
*/
cancellable?: boolean;
/** Optional, more detailed progress message. */
message?: string;
/** Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. */
percentage?: number;
};
}
/** Event message for 'progressUpdate' event type.
The event signals that the progress reporting needs to updated with a new message and/or percentage.
The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.
This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.
*/
export interface ProgressUpdateEvent extends Event {
// event: 'progressUpdate';
body: {
/** The ID that was introduced in the initial 'progressStart' event. */
progressId: string;
/** Optional, more detailed progress message. If omitted, the previous message (if any) is used. */
message?: string;
/** Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. */
percentage?: number;
};
}
/** Event message for 'progressEnd' event type.
The event signals the end of the progress reporting with an optional final message.
This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.
*/
export interface ProgressEndEvent extends Event {
// event: 'progressEnd';
body: {
/** The ID that was introduced in the initial 'ProgressStartEvent'. */
progressId: string;
/** Optional, more detailed progress message. If omitted, the previous message (if any) is used. */
message?: string;
};
}
/** RunInTerminal request; value of command field is 'runInTerminal'.
This optional request is sent from the debug adapter to the client to run a command in a terminal.
This is typically used to launch the debuggee in a terminal provided by the client.
This request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.
*/
export interface RunInTerminalRequest extends Request {
// command: 'runInTerminal';
arguments: RunInTerminalRequestArguments;
}
/** Arguments for 'runInTerminal' request. */
export interface RunInTerminalRequestArguments {
/** What kind of terminal to launch. */
kind?: 'integrated' | 'external';
/** Optional title of the terminal. */
title?: string;
/** Working directory of the command. */
cwd: string;
/** List of arguments. The first argument is the command to run. */
args: string[];
/** Environment key-value pairs that are added to or removed from the default environment. */
env?: { [key: string]: string | null; };
}
/** Response to 'runInTerminal' request. */
export interface RunInTerminalResponse extends Response {
body: {
/** The process ID. The value should be less than or equal to 2147483647 (2^31 - 1). */
processId?: number;
/** The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31 - 1). */
shellProcessId?: number;
};
}
/** Initialize request; value of command field is 'initialize'.
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.
Until the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter.
In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.
The 'initialize' request may only be sent once.
*/
export interface InitializeRequest extends Request {
// command: 'initialize';
arguments: InitializeRequestArguments;
}
/** Arguments for 'initialize' request. */
export interface InitializeRequestArguments {
/** The ID of the (frontend) client using this adapter. */
clientID?: string;
/** The human readable name of the (frontend) client using this adapter. */
clientName?: string;
/** The ID of the debug adapter. */
adapterID: string;
/** The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH. */
locale?: string;
/** If true all line numbers are 1-based (default). */
linesStartAt1?: boolean;
/** If true all column numbers are 1-based (default). */
columnsStartAt1?: boolean;
/** Determines in what format paths are specified. The default is 'path', which is the native format.
Values: 'path', 'uri', etc.
*/
pathFormat?: string;
/** Client supports the optional type attribute for variables. */
supportsVariableType?: boolean;
/** Client supports the paging of variables. */
supportsVariablePaging?: boolean;
/** Client supports the runInTerminal request. */
supportsRunInTerminalRequest?: boolean;
/** Client supports memory references. */
supportsMemoryReferences?: boolean;
/** Client supports progress reporting. */
supportsProgressReporting?: boolean;
}
/** Response to 'initialize' request. */
export interface InitializeResponse extends Response {
/** The capabilities of this debug adapter. */
body?: Capabilities;
}
/** ConfigurationDone request; value of command field is 'configurationDone'.
This optional request indicates that the client has finished initialization of the debug adapter.
So it is the last request in the sequence of configuration requests (which was started by the 'initialized' event).
Clients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.
*/
export interface ConfigurationDoneRequest extends Request {
// command: 'configurationDone';
arguments?: ConfigurationDoneArguments;
}
/** Arguments for 'configurationDone' request. */
export interface ConfigurationDoneArguments {
}
/** Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required. */
export interface ConfigurationDoneResponse extends Response {
}
/** Launch request; value of command field is 'launch'.
This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).
Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.
*/
export interface LaunchRequest extends Request {
// command: 'launch';
arguments: LaunchRequestArguments;
}
/** Arguments for 'launch' request. Additional attributes are implementation specific. */
export interface LaunchRequestArguments {
/** If noDebug is true the launch request should launch the program without enabling debugging. */
noDebug?: boolean;
/** Optional data from the previous, restarted session.
The data is sent as the 'restart' attribute of the 'terminated' event.
The client should leave the data intact.
*/
__restart?: any;
}
/** Response to 'launch' request. This is just an acknowledgement, so no body field is required. */
export interface LaunchResponse extends Response {
}
/** Attach request; value of command field is 'attach'.
The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.
Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification.
*/
export interface AttachRequest extends Request {
// command: 'attach';
arguments: AttachRequestArguments;
}
/** Arguments for 'attach' request. Additional attributes are implementation specific. */
export interface AttachRequestArguments {
/** Optional data from the previous, restarted session.
The data is sent as the 'restart' attribute of the 'terminated' event.
The client should leave the data intact.
*/
__restart?: any;
}
/** Response to 'attach' request. This is just an acknowledgement, so no body field is required. */
export interface AttachResponse extends Response {
}
/** Restart request; value of command field is 'restart'.
Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.
If 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.
*/
export interface RestartRequest extends Request {
// command: 'restart';
arguments?: RestartArguments;
}
/** Arguments for 'restart' request. */
export interface RestartArguments {
}
/** Response to 'restart' request. This is just an acknowledgement, so no body field is required. */
export interface RestartResponse extends Response {
}
/** Disconnect request; value of command field is 'disconnect'.
The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.
It asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.
If the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.
If the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.
This behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).
*/
export interface DisconnectRequest extends Request {
// command: 'disconnect';
arguments?: DisconnectArguments;
}
/** Arguments for 'disconnect' request. */
export interface DisconnectArguments {
/** A value of true indicates that this 'disconnect' request is part of a restart sequence. */
restart?: boolean;
/** Indicates whether the debuggee should be terminated when the debugger is disconnected.
If unspecified, the debug adapter is free to do whatever it thinks is best.
The attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true.
*/
terminateDebuggee?: boolean;
}
/** Response to 'disconnect' request. This is just an acknowledgement, so no body field is required. */
export interface DisconnectResponse extends Response {
}
/** Terminate request; value of command field is 'terminate'.
The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.
Clients should only call this request if the capability 'supportsTerminateRequest' is true.
*/
export interface TerminateRequest extends Request {
// command: 'terminate';
arguments?: TerminateArguments;
}
/** Arguments for 'terminate' request. */
export interface TerminateArguments {
/** A value of true indicates that this 'terminate' request is part of a restart sequence. */
restart?: boolean;
}
/** Response to 'terminate' request. This is just an acknowledgement, so no body field is required. */
export interface TerminateResponse extends Response {
}
/** BreakpointLocations request; value of command field is 'breakpointLocations'.
The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.
Clients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.
*/
export interface BreakpointLocationsRequest extends Request {
// command: 'breakpointLocations';
arguments?: BreakpointLocationsArguments;
}
/** Arguments for 'breakpointLocations' request. */
export interface BreakpointLocationsArguments {
/** The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified. */
source: Source;
/** Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. */
line: number;
/** Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed. */
column?: number;
/** Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. */
endLine?: number;
/** Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line. */
endColumn?: number;
}
/** Response to 'breakpointLocations' request.
Contains possible locations for source breakpoints.
*/
export interface BreakpointLocationsResponse extends Response {
body: {
/** Sorted set of possible breakpoint locations. */
breakpoints: BreakpointLocation[];
};
}
/** SetBreakpoints request; value of command field is 'setBreakpoints'.
Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
To clear all breakpoint for a source, specify an empty array.
When a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.
*/
export interface SetBreakpointsRequest extends Request {
// command: 'setBreakpoints';
arguments: SetBreakpointsArguments;
}
/** Arguments for 'setBreakpoints' request. */
export interface SetBreakpointsArguments {
/** The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified. */
source: Source;
/** The code locations of the breakpoints. */
breakpoints?: SourceBreakpoint[];
/** Deprecated: The code locations of the breakpoints. */
lines?: number[];
/** A value of true indicates that the underlying source has been modified which results in new breakpoint locations. */
sourceModified?: boolean;
}
/** Response to 'setBreakpoints' request.
Returned is information about each breakpoint created by this request.
This includes the actual code location and whether the breakpoint could be verified.
The breakpoints returned are in the same order as the elements of the 'breakpoints'
(or the deprecated 'lines') array in the arguments.
*/
export interface SetBreakpointsResponse extends Response {
body: {
/** Information about the breakpoints.
The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments.
*/
breakpoints: Breakpoint[];
};
}
/** SetFunctionBreakpoints request; value of command field is 'setFunctionBreakpoints'.
Replaces all existing function breakpoints with new function breakpoints.
To clear all function breakpoints, specify an empty array.
When a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.
Clients should only call this request if the capability 'supportsFunctionBreakpoints' is true.
*/
export interface SetFunctionBreakpointsRequest extends Request {
// command: 'setFunctionBreakpoints';
arguments: SetFunctionBreakpointsArguments;
}
/** Arguments for 'setFunctionBreakpoints' request. */
export interface SetFunctionBreakpointsArguments {
/** The function names of the breakpoints. */
breakpoints: FunctionBreakpoint[];
}
/** Response to 'setFunctionBreakpoints' request.
Returned is information about each breakpoint created by this request.
*/
export interface SetFunctionBreakpointsResponse extends Response {
body: {
/** Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array. */
breakpoints: Breakpoint[];
};
}
/** SetExceptionBreakpoints request; value of command field is 'setExceptionBreakpoints'.
The request configures the debuggers response to thrown exceptions.
If an exception is configured to break, a 'stopped' event is fired (with reason 'exception').
Clients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.
*/
export interface SetExceptionBreakpointsRequest extends Request {
// command: 'setExceptionBreakpoints';
arguments: SetExceptionBreakpointsArguments;
}
/** Arguments for 'setExceptionBreakpoints' request. */
export interface SetExceptionBreakpointsArguments {
/** IDs of checked exception options. The set of IDs is returned via the 'exceptionBreakpointFilters' capability. */
filters: string[];
/** Configuration options for selected exceptions.
The attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true.
*/
exceptionOptions?: ExceptionOptions[];
}
/** Response to 'setExceptionBreakpoints' request. This is just an acknowledgement, so no body field is required. */
export interface SetExceptionBreakpointsResponse extends Response {
}
/** DataBreakpointInfo request; value of command field is 'dataBreakpointInfo'.
Obtains information on a possible data breakpoint that could be set on an expression or variable.
Clients should only call this request if the capability 'supportsDataBreakpoints' is true.
*/
export interface DataBreakpointInfoRequest extends Request {
// command: 'dataBreakpointInfo';
arguments: DataBreakpointInfoArguments;
}
/** Arguments for 'dataBreakpointInfo' request. */
export interface DataBreakpointInfoArguments {
/** Reference to the Variable container if the data breakpoint is requested for a child of the container. */
variablesReference?: number;
/** The name of the Variable's child to obtain data breakpoint information for.
If variableReference isn’t provided, this can be an expression.
*/
name: string;
}
/** Response to 'dataBreakpointInfo' request. */
export interface DataBreakpointInfoResponse extends Response {
body: {
/** An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available. */
dataId: string | null;
/** UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available. */
description: string;
/** Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information. */
accessTypes?: DataBreakpointAccessType[];
/** Optional attribute indicating that a potential data breakpoint could be persisted across sessions. */
canPersist?: boolean;
};
}
/** SetDataBreakpoints request; value of command field is 'setDataBreakpoints'.
Replaces all existing data breakpoints with new data breakpoints.
To clear all data breakpoints, specify an empty array.
When a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.
Clients should only call this request if the capability 'supportsDataBreakpoints' is true.
*/
export interface SetDataBreakpointsRequest extends Request {
// command: 'setDataBreakpoints';
arguments: SetDataBreakpointsArguments;
}
/** Arguments for 'setDataBreakpoints' request. */
export interface SetDataBreakpointsArguments {
/** The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. */
breakpoints: DataBreakpoint[];
}
/** Response to 'setDataBreakpoints' request.
Returned is information about each breakpoint created by this request.
*/
export interface SetDataBreakpointsResponse extends Response {
body: {
/** Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array. */
breakpoints: Breakpoint[];
};
}
/** Continue request; value of command field is 'continue'.
The request starts the debuggee to run again.
*/
export interface ContinueRequest extends Request {
// command: 'continue';
arguments: ContinueArguments;
}
/** Arguments for 'continue' request. */
export interface ContinueArguments {
/** Continue execution for the specified thread (if possible).
If the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true.
*/
threadId: number;
}
/** Response to 'continue' request. */
export interface ContinueResponse extends Response {
body: {
/** If true, the 'continue' request has ignored the specified thread and continued all threads instead.
If this attribute is missing a value of 'true' is assumed for backward compatibility.
*/
allThreadsContinued?: boolean;
};
}
/** Next request; value of command field is 'next'.
The request starts the debuggee to run again for one step.
The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.
*/
export interface NextRequest extends Request {
// command: 'next';
arguments: NextArguments;
}
/** Arguments for 'next' request. */
export interface NextArguments {
/** Execute 'next' for this thread. */
threadId: number;
}
/** Response to 'next' request. This is just an acknowledgement, so no body field is required. */
export interface NextResponse extends Response {
}
/** StepIn request; value of command field is 'stepIn'.
The request starts the debuggee to step into a function/method if possible.
If it cannot step into a target, 'stepIn' behaves like 'next'.
The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.
If there are multiple function/method calls (or other targets) on the source line,
the optional argument 'targetId' can be used to control into which target the 'stepIn' should occur.
The list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.
*/
export interface StepInRequest extends Request {
// command: 'stepIn';
arguments: StepInArguments;
}
/** Arguments for 'stepIn' request. */
export interface StepInArguments {
/** Execute 'stepIn' for this thread. */
threadId: number;
/** Optional id of the target to step into. */
targetId?: number;
}
/** Response to 'stepIn' request. This is just an acknowledgement, so no body field is required. */
export interface StepInResponse extends Response {
}
/** StepOut request; value of command field is 'stepOut'.
The request starts the debuggee to run again for one step.
The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.
*/
export interface StepOutRequest extends Request {
// command: 'stepOut';
arguments: StepOutArguments;
}
/** Arguments for 'stepOut' request. */
export interface StepOutArguments {
/** Execute 'stepOut' for this thread. */
threadId: number;
}
/** Response to 'stepOut' request. This is just an acknowledgement, so no body field is required. */
export interface StepOutResponse extends Response {
}
/** StepBack request; value of command field is 'stepBack'.
The request starts the debuggee to run one step backwards.
The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.
Clients should only call this request if the capability 'supportsStepBack' is true.
*/
export interface StepBackRequest extends Request {
// command: 'stepBack';
arguments: StepBackArguments;
}
/** Arguments for 'stepBack' request. */
export interface StepBackArguments {
/** Execute 'stepBack' for this thread. */
threadId: number;
}
/** Response to 'stepBack' request. This is just an acknowledgement, so no body field is required. */
export interface StepBackResponse extends Response {
}
/** ReverseContinue request; value of command field is 'reverseContinue'.
The request starts the debuggee to run backward.
Clients should only call this request if the capability 'supportsStepBack' is true.
*/
export interface ReverseContinueRequest extends Request {
// command: 'reverseContinue';
arguments: ReverseContinueArguments;
}
/** Arguments for 'reverseContinue' request. */
export interface ReverseContinueArguments {
/** Execute 'reverseContinue' for this thread. */
threadId: number;
}
/** Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required. */
export interface ReverseContinueResponse extends Response {
}
/** RestartFrame request; value of command field is 'restartFrame'.
The request restarts execution of the specified stackframe.
The debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.
Clients should only call this request if the capability 'supportsRestartFrame' is true.
*/
export interface RestartFrameRequest extends Request {
// command: 'restartFrame';
arguments: RestartFrameArguments;
}
/** Arguments for 'restartFrame' request. */
export interface RestartFrameArguments {
/** Restart this stackframe. */
frameId: number;
}
/** Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required. */
export interface RestartFrameResponse extends Response {
}
/** Goto request; value of command field is 'goto'.
The request sets the location where the debuggee will continue to run.
This makes it possible to skip the execution of code or to executed code again.
The code between the current location and the goto target is not executed but skipped.
The debug adapter first sends the response and then a 'stopped' event with reason 'goto'.
Clients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).
*/
export interface GotoRequest extends Request {
// command: 'goto';
arguments: GotoArguments;
}
/** Arguments for 'goto' request. */
export interface GotoArguments {
/** Set the goto target for this thread. */
threadId: number;
/** The location where the debuggee will continue to run. */
targetId: number;
}
/** Response to 'goto' request. This is just an acknowledgement, so no body field is required. */
export interface GotoResponse extends Response {
}
/** Pause request; value of command field is 'pause'.
The request suspends the debuggee.
The debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.
*/
export interface PauseRequest extends Request {
// command: 'pause';
arguments: PauseArguments;
}
/** Arguments for 'pause' request. */
export interface PauseArguments {
/** Pause execution for this thread. */
threadId: number;
}
/** Response to 'pause' request. This is just an acknowledgement, so no body field is required. */
export interface PauseResponse extends Response {
}
/** StackTrace request; value of command field is 'stackTrace'.
The request returns a stacktrace from the current execution state.
*/
export interface StackTraceRequest extends Request {
// command: 'stackTrace';
arguments: StackTraceArguments;
}
/** Arguments for 'stackTrace' request. */
export interface StackTraceArguments {
/** Retrieve the stacktrace for this thread. */
threadId: number;
/** The index of the first frame to return; if omitted frames start at 0. */
startFrame?: number;
/** The maximum number of frames to return. If levels is not specified or 0, all frames are returned. */
levels?: number;
/** Specifies details on how to format the stack frames.
The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.
*/
format?: StackFrameFormat;
}
/** Response to 'stackTrace' request. */
export interface StackTraceResponse extends Response {
body: {
/** The frames of the stackframe. If the array has length zero, there are no stackframes available.
This means that there is no location information available.
*/
stackFrames: StackFrame[];
/** The total number of frames available. */
totalFrames?: number;
};
}
/** Scopes request; value of command field is 'scopes'.
The request returns the variable scopes for a given stackframe ID.
*/
export interface ScopesRequest extends Request {
// command: 'scopes';
arguments: ScopesArguments;
}