-
Notifications
You must be signed in to change notification settings - Fork 29.4k
/
debugProtocol.d.ts
1474 lines (1331 loc) · 60 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. */
seq: number;
/** Message type.
Values: 'request', 'response', 'event', etc.
*/
type: string;
}
/** A client or server-initiated request. */
export interface Request extends ProtocolMessage {
// type: 'request';
/** The command to execute. */
command: string;
/** Object containing arguments for the command. */
arguments?: any;
}
/** Server-initiated event. */
export interface Event extends ProtocolMessage {
// type: 'event';
/** Type of event. */
event: string;
/** Event-specific information. */
body?: any;
}
/** Response to a request. */
export interface Response extends ProtocolMessage {
// type: 'response';
/** Sequence number of the corresponding request. */
request_seq: number;
/** Outcome of the request. */
success: boolean;
/** The command requested. */
command: string;
/** Contains error message if success == false. */
message?: string;
/** Contains request result if success is true and optional error details if success is false. */
body?: any;
}
/** 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 InitializeRequest has finished).
The sequence of events/requests is as follows:
- adapters sends InitializedEvent (after the InitializeRequest has returned)
- frontend sends zero or more SetBreakpointsRequest
- frontend sends one SetFunctionBreakpointsRequest
- frontend sends a SetExceptionBreakpointsRequest 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 ConfigurationDoneRequest 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', etc.
*/
reason: string;
/** The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is. */
description?: string;
/** The thread which was stopped. */
threadId?: number;
/** 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 ContinuedEvent 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.
*/
export interface ExitedEvent extends Event {
// event: 'exited';
body: {
/** The exit code returned from the debuggee. */
exitCode: number;
};
}
/** Event message for 'terminated' event types.
The event indicates that debugging of the debuggee has terminated.
*/
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 launchRequest.
*/
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;
/** If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing variablesReference to the VariablesRequest. */
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 breakpoint. */
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';
};
}
/** runInTerminal request; value of command field is 'runInTerminal'.
With this request a debug adapter can run a command in a terminal.
*/
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 the default environment. */
env?: { [key: string]: string; };
}
/** Response to Initialize request. */
export interface RunInTerminalResponse extends Response {
body: {
/** The process ID. */
processId?: number;
};
}
/** On error that is whenever 'success' is false, the body can provide more details. */
export interface ErrorResponse extends Response {
body: {
/** An optional, structured error message. */
error?: Message;
};
}
/** Initialize request; value of command field is 'initialize'. */
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 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;
}
/** 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'.
The client of the debug protocol must send this request at the end of the sequence of configuration requests (which was started by the InitializedEvent).
*/
export interface ConfigurationDoneRequest extends Request {
// command: 'configurationDone';
arguments?: ConfigurationDoneArguments;
}
/** Arguments for 'configurationDone' request.
The configurationDone request has no standardized attributes.
*/
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'. */
export interface LaunchRequest extends Request {
// command: 'launch';
arguments: LaunchRequestArguments;
}
/** Arguments for 'launch' request. */
export interface LaunchRequestArguments {
/** If noDebug is true the launch request should launch the program without enabling debugging. */
noDebug?: boolean;
}
/** 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'. */
export interface AttachRequest extends Request {
// command: 'attach';
arguments: AttachRequestArguments;
}
/** Arguments for 'attach' request.
The attach request has no standardized attributes.
*/
export interface AttachRequestArguments {
}
/** 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. If the capability 'supportsRestartRequest' is missing or has the value false,
the client will implement 'restart' by terminating the debug adapter first and then launching it anew.
A debug adapter can override this default behaviour by implementing a restart request
and setting the capability 'supportsRestartRequest' to true.
*/
export interface RestartRequest extends Request {
// command: 'restart';
arguments?: RestartArguments;
}
/** Arguments for 'restart' request.
The restart request has no standardized attributes.
*/
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'. */
export interface DisconnectRequest extends Request {
// command: 'disconnect';
arguments?: DisconnectArguments;
}
/** Arguments for 'disconnect' request. */
export interface DisconnectArguments {
/** 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.
A client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability.
*/
terminateDebuggee?: boolean;
}
/** Response to 'disconnect' request. This is just an acknowledgement, so no body field is required. */
export interface DisconnectResponse extends Response {
}
/** 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 StoppedEvent (event type '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') in the SetBreakpointsArguments.
*/
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') in the SetBreakpointsArguments. */
breakpoints: Breakpoint[];
};
}
/** SetFunctionBreakpoints request; value of command field is 'setFunctionBreakpoints'.
Sets multiple function breakpoints and clears all previous function breakpoints.
To clear all function breakpoint, specify an empty array.
When a function breakpoint is hit, a StoppedEvent (event type 'function breakpoint') is generated.
*/
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 StoppedEvent is fired (event type 'exception').
*/
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. */
exceptionOptions?: ExceptionOptions[];
}
/** Response to 'setExceptionBreakpoints' request. This is just an acknowledgement, so no body field is required. */
export interface SetExceptionBreakpointsResponse extends Response {
}
/** 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 NextResponse and then a StoppedEvent (event type '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 StepInResponse and then a StoppedEvent (event type '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 StepOutResponse and then a StoppedEvent (event type '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 StepBackResponse and then a StoppedEvent (event type '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 {
/** Exceute '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 {
/** Exceute '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 RestartFrameResponse and then a StoppedEvent (event type 'restart') after the restart has completed.
*/
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 GotoResponse and then a StoppedEvent (event type 'goto').
*/
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 suspenses the debuggee.
The debug adapter first sends the PauseResponse and then a StoppedEvent (event type '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. */
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;
}
/** Arguments for 'scopes' request. */
export interface ScopesArguments {
/** Retrieve the scopes for this stackframe. */
frameId: number;
}
/** Response to 'scopes' request. */
export interface ScopesResponse extends Response {
body: {
/** The scopes of the stackframe. If the array has length zero, there are no scopes available. */
scopes: Scope[];
};
}
/** Variables request; value of command field is 'variables'.
Retrieves all child variables for the given variable reference.
An optional filter can be used to limit the fetched children to either named or indexed children.
*/
export interface VariablesRequest extends Request {
// command: 'variables';
arguments: VariablesArguments;
}
/** Arguments for 'variables' request. */
export interface VariablesArguments {
/** The Variable reference. */
variablesReference: number;
/** Optional filter to limit the child variables to either named or indexed. If ommited, both types are fetched. */
filter?: 'indexed' | 'named';
/** The index of the first variable to return; if omitted children start at 0. */
start?: number;
/** The number of variables to return. If count is missing or 0, all variables are returned. */
count?: number;
/** Specifies details on how to format the Variable values. */
format?: ValueFormat;
}
/** Response to 'variables' request. */
export interface VariablesResponse extends Response {
body: {
/** All (or a range) of variables for the given variable reference. */
variables: Variable[];
};
}
/** setVariable request; value of command field is 'setVariable'.
Set the variable with the given name in the variable container to a new value.
*/
export interface SetVariableRequest extends Request {
// command: 'setVariable';
arguments: SetVariableArguments;
}
/** Arguments for 'setVariable' request. */
export interface SetVariableArguments {
/** The reference of the variable container. */
variablesReference: number;
/** The name of the variable. */
name: string;
/** The value of the variable. */
value: string;
/** Specifies details on how to format the response value. */
format?: ValueFormat;
}
/** Response to 'setVariable' request. */
export interface SetVariableResponse extends Response {
body: {
/** The new value of the variable. */
value: string;
/** The type of the new value. Typically shown in the UI when hovering over the value. */
type?: string;
/** If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. */
variablesReference?: number;
/** The number of named child variables.
The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
*/
namedVariables?: number;
/** The number of indexed child variables.
The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
*/
indexedVariables?: number;
};
}
/** Source request; value of command field is 'source'.
The request retrieves the source code for a given source reference.
*/
export interface SourceRequest extends Request {
// command: 'source';
arguments: SourceArguments;
}
/** Arguments for 'source' request. */
export interface SourceArguments {
/** Specifies the source content to load. Either source.path or source.sourceReference must be specified. */
source?: Source;
/** The reference to the source. This is the same as source.sourceReference. This is provided for backward compatibility since old backends do not understand the 'source' attribute. */
sourceReference: number;
}
/** Response to 'source' request. */
export interface SourceResponse extends Response {
body: {
/** Content of the source reference. */
content: string;
/** Optional content type (mime type) of the source. */
mimeType?: string;
};
}
/** Thread request; value of command field is 'threads'.
The request retrieves a list of all threads.
*/
export interface ThreadsRequest extends Request {
// command: 'threads';
}
/** Response to 'threads' request. */
export interface ThreadsResponse extends Response {
body: {
/** All threads. */
threads: Thread[];
};
}
/** Modules can be retrieved from the debug adapter with the ModulesRequest which can either return all modules or a range of modules to support paging. */
export interface ModulesRequest extends Request {
// command: 'modules';
arguments: ModulesArguments;
}
/** Arguments for 'modules' request. */
export interface ModulesArguments {
/** The index of the first module to return; if omitted modules start at 0. */
startModule?: number;
/** The number of modules to return. If moduleCount is not specified or 0, all modules are returned. */
moduleCount?: number;
}
/** Response to 'modules' request. */
export interface ModulesResponse extends Response {
body: {
/** All modules or range of modules. */
modules: Module[];
/** The total number of modules available. */
totalModules?: number;
};
}
/** Retrieves the set of all sources currently loaded by the debugged process. */
export interface LoadedSourcesRequest extends Request {
// command: 'loadedSources';
arguments?: LoadedSourcesArguments;
}
/** Arguments for 'loadedSources' request.
The 'loadedSources' request has no standardized arguments.
*/
export interface LoadedSourcesArguments {
}
/** Response to 'loadedSources' request. */
export interface LoadedSourcesResponse extends Response {
body: {
/** Set of loaded sources. */
sources: Source[];
};
}
/** Evaluate request; value of command field is 'evaluate'.
Evaluates the given expression in the context of the top most stack frame.
The expression has access to any variables and arguments that are in scope.
*/
export interface EvaluateRequest extends Request {
// command: 'evaluate';
arguments: EvaluateArguments;
}
/** Arguments for 'evaluate' request. */
export interface EvaluateArguments {
/** The expression to evaluate. */
expression: string;
/** Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. */
frameId?: number;
/** The context in which the evaluate request is run.
Values:
'watch': evaluate is run in a watch.
'repl': evaluate is run from REPL console.
'hover': evaluate is run from a data hover.
etc.
*/
context?: string;
/** Specifies details on how to format the Evaluate result. */
format?: ValueFormat;
}
/** Response to 'evaluate' request. */
export interface EvaluateResponse extends Response {
body: {
/** The result of the evaluate request. */
result: string;
/** The optional type of the evaluate result. */
type?: string;
/** Properties of a evaluate result that can be used to determine how to render the result in the UI. */
presentationHint?: VariablePresentationHint;
/** If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. */
variablesReference: number;
/** The number of named child variables.
The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
*/
namedVariables?: number;
/** The number of indexed child variables.
The client can use this optional information to present the variables in a paged UI and fetch them in chunks.
*/
indexedVariables?: number;
};
}
/** StepInTargets request; value of command field is 'stepInTargets'.
This request retrieves the possible stepIn targets for the specified stack frame.
These targets can be used in the 'stepIn' request.
The StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.
*/
export interface StepInTargetsRequest extends Request {
// command: 'stepInTargets';
arguments: StepInTargetsArguments;
}
/** Arguments for 'stepInTargets' request. */
export interface StepInTargetsArguments {
/** The stack frame for which to retrieve the possible stepIn targets. */
frameId: number;
}
/** Response to 'stepInTargets' request. */
export interface StepInTargetsResponse extends Response {
body: {
/** The possible stepIn targets of the specified source location. */
targets: StepInTarget[];
};
}
/** GotoTargets request; value of command field is 'gotoTargets'.
This request retrieves the possible goto targets for the specified source location.
These targets can be used in the 'goto' request.
The GotoTargets request may only be called if the 'supportsGotoTargetsRequest' capability exists and is true.
*/
export interface GotoTargetsRequest extends Request {
// command: 'gotoTargets';
arguments: GotoTargetsArguments;
}
/** Arguments for 'gotoTargets' request. */
export interface GotoTargetsArguments {
/** The source location for which the goto targets are determined. */
source: Source;
/** The line location for which the goto targets are determined. */
line: number;
/** An optional column location for which the goto targets are determined. */
column?: number;
}
/** Response to 'gotoTargets' request. */
export interface GotoTargetsResponse extends Response {
body: {
/** The possible goto targets of the specified location. */
targets: GotoTarget[];
};
}
/** CompletionsRequest request; value of command field is 'completions'.
Returns a list of possible completions for a given caret position and text.
The CompletionsRequest may only be called if the 'supportsCompletionsRequest' capability exists and is true.
*/
export interface CompletionsRequest extends Request {
// command: 'completions';
arguments: CompletionsArguments;
}
/** Arguments for 'completions' request. */
export interface CompletionsArguments {
/** Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. */
frameId?: number;
/** One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion. */
text: string;
/** The character position for which to determine the completion proposals. */
column: number;
/** An optional line for which to determine the completion proposals. If missing the first line of the text is assumed. */
line?: number;
}
/** Response to 'completions' request. */
export interface CompletionsResponse extends Response {
body: {
/** The possible completions for . */
targets: CompletionItem[];
};
}