@opensumi/sumi 2.12.1-next-079c1930

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +1 -0
  2. package/build.ts +18 -0
  3. package/index.d.ts +5 -0
  4. package/manifest.json +414 -0
  5. package/package.json +18 -0
  6. package/sumi-browser.d.ts +273 -0
  7. package/sumi-worker/sumi-worker.d.ts +2788 -0
  8. package/sumi-worker/worker.command.d.ts +86 -0
  9. package/sumi-worker/worker.comments.d.ts +273 -0
  10. package/sumi-worker/worker.doc.d.ts +356 -0
  11. package/sumi-worker/worker.editor.d.ts +725 -0
  12. package/sumi-worker/worker.extensions.d.ts +63 -0
  13. package/sumi-worker/worker.language.d.ts +2220 -0
  14. package/sumi-worker/worker.window.d.ts +318 -0
  15. package/sumi-worker.d.ts +7 -0
  16. package/sumi.d.ts +822 -0
  17. package/vscode/typings/vscode.authentication.d.ts +231 -0
  18. package/vscode/typings/vscode.command.d.ts +86 -0
  19. package/vscode/typings/vscode.comments.d.ts +292 -0
  20. package/vscode/typings/vscode.d.ts +3789 -0
  21. package/vscode/typings/vscode.debug.d.ts +684 -0
  22. package/vscode/typings/vscode.doc.d.ts +272 -0
  23. package/vscode/typings/vscode.editor.d.ts +1017 -0
  24. package/vscode/typings/vscode.env.d.ts +153 -0
  25. package/vscode/typings/vscode.extension.d.ts +67 -0
  26. package/vscode/typings/vscode.language.d.ts +2630 -0
  27. package/vscode/typings/vscode.message.d.ts +195 -0
  28. package/vscode/typings/vscode.proposed.d.ts +662 -0
  29. package/vscode/typings/vscode.quickpick.d.ts +491 -0
  30. package/vscode/typings/vscode.scm.d.ts +254 -0
  31. package/vscode/typings/vscode.tasks.d.ts +676 -0
  32. package/vscode/typings/vscode.theme.d.ts +370 -0
  33. package/vscode/typings/vscode.window.d.ts +870 -0
  34. package/vscode/typings/vscode.workspace.d.ts +664 -0
  35. package/vscode/typings-pending/vscode.d.ts +27 -0
  36. package/vscode/typings-pending/vscode.proposed.d.ts +3 -0
  37. package/vscode.d.ts +23 -0
@@ -0,0 +1,684 @@
1
+ declare module 'vscode' {
2
+ /**
3
+ * Configuration for a debug session.
4
+ */
5
+ export interface DebugConfiguration {
6
+ /**
7
+ * The type of the debug session.
8
+ */
9
+ type: string;
10
+
11
+ /**
12
+ * The name of the debug session.
13
+ */
14
+ name: string;
15
+
16
+ /**
17
+ * The request type of the debug session.
18
+ */
19
+ request: string;
20
+
21
+ /**
22
+ * Additional debug type specific properties.
23
+ */
24
+ [key: string]: any;
25
+ }
26
+
27
+ /**
28
+ * A debug session.
29
+ */
30
+ export interface DebugSession {
31
+ /**
32
+ * The unique ID of this debug session.
33
+ */
34
+ readonly id: string;
35
+
36
+ /**
37
+ * The debug session's type from the [debug configuration](#DebugConfiguration).
38
+ */
39
+ readonly type: string;
40
+
41
+ /**
42
+ * The debug session's name from the [debug configuration](#DebugConfiguration).
43
+ */
44
+ readonly name: string;
45
+
46
+ /**
47
+ * The workspace folder of this session or `undefined` for a folderless setup.
48
+ */
49
+ readonly workspaceFolder: WorkspaceFolder | undefined;
50
+
51
+ /**
52
+ * The "resolved" [debug configuration](#DebugConfiguration) of this session.
53
+ * "Resolved" means that
54
+ * - all variables have been substituted and
55
+ * - platform specific attribute sections have been "flattened" for the matching platform and removed for non-matching platforms.
56
+ */
57
+ readonly configuration: DebugConfiguration;
58
+
59
+ /**
60
+ * Send a custom request to the debug adapter.
61
+ */
62
+ customRequest(command: string, args?: any): Thenable<any>;
63
+
64
+ /**
65
+ * Maps a VS Code breakpoint to the corresponding Debug Adapter Protocol (DAP) breakpoint that is managed by the debug adapter of the debug session.
66
+ * If no DAP breakpoint exists (either because the VS Code breakpoint was not yet registered or because the debug adapter is not interested in the breakpoint), the value `undefined` is returned.
67
+ *
68
+ * @param breakpoint A VS Code [breakpoint](#Breakpoint).
69
+ * @return A promise that resolves to the Debug Adapter Protocol breakpoint or `undefined`.
70
+ */
71
+ getDebugProtocolBreakpoint(breakpoint: Breakpoint): Thenable<DebugProtocolBreakpoint | undefined>;
72
+ }
73
+
74
+ /**
75
+ * A custom Debug Adapter Protocol event received from a [debug session](#DebugSession).
76
+ */
77
+ export interface DebugSessionCustomEvent {
78
+ /**
79
+ * The [debug session](#DebugSession) for which the custom event was received.
80
+ */
81
+ readonly session: DebugSession;
82
+
83
+ /**
84
+ * Type of event.
85
+ */
86
+ readonly event: string;
87
+
88
+ /**
89
+ * Event specific information.
90
+ */
91
+ readonly body?: any;
92
+ }
93
+
94
+ /**
95
+ * A debug configuration provider allows to add the initial debug configurations to a newly created launch.json
96
+ * and to resolve a launch configuration before it is used to start a new debug session.
97
+ * A debug configuration provider is registered via #debug.registerDebugConfigurationProvider.
98
+ */
99
+ export interface DebugConfigurationProvider {
100
+ /**
101
+ * Provides initial [debug configuration](#DebugConfiguration). If more than one debug configuration provider is
102
+ * registered for the same type, debug configurations are concatenated in arbitrary order.
103
+ *
104
+ * @param folder The workspace folder for which the configurations are used or `undefined` for a folderless setup.
105
+ * @param token A cancellation token.
106
+ * @return An array of [debug configurations](#DebugConfiguration).
107
+ */
108
+ provideDebugConfigurations?(
109
+ folder: WorkspaceFolder | undefined,
110
+ token?: CancellationToken
111
+ ): ProviderResult<DebugConfiguration[]>;
112
+
113
+ /**
114
+ * Resolves a [debug configuration](#DebugConfiguration) by filling in missing values or by adding/changing/removing attributes.
115
+ * If more than one debug configuration provider is registered for the same type, the resolveDebugConfiguration calls are chained
116
+ * in arbitrary order and the initial debug configuration is piped through the chain.
117
+ * Returning the value 'undefined' prevents the debug session from starting.
118
+ * Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
119
+ *
120
+ * @param folder The workspace folder from which the configuration originates from or `undefined` for a folderless setup.
121
+ * @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
122
+ * @param token A cancellation token.
123
+ * @return The resolved debug configuration or undefined or null.
124
+ */
125
+ resolveDebugConfiguration?(
126
+ folder: WorkspaceFolder | undefined,
127
+ debugConfiguration: DebugConfiguration,
128
+ token?: CancellationToken
129
+ ): ProviderResult<DebugConfiguration>;
130
+
131
+ /**
132
+ * This hook is directly called after 'resolveDebugConfiguration' but with all variables substituted.
133
+ * It can be used to resolve or verify a [debug configuration](#DebugConfiguration) by filling in missing values or by adding/changing/removing attributes.
134
+ * If more than one debug configuration provider is registered for the same type, the 'resolveDebugConfigurationWithSubstitutedVariables' calls are chained
135
+ * in arbitrary order and the initial debug configuration is piped through the chain.
136
+ * Returning the value 'undefined' prevents the debug session from starting.
137
+ * Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
138
+ *
139
+ * @param folder The workspace folder from which the configuration originates from or `undefined` for a folderless setup.
140
+ * @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
141
+ * @param token A cancellation token.
142
+ * @return The resolved debug configuration or undefined or null.
143
+ */
144
+ resolveDebugConfigurationWithSubstitutedVariables?(
145
+ folder: WorkspaceFolder | undefined,
146
+ debugConfiguration: DebugConfiguration,
147
+ token?: CancellationToken
148
+ ): ProviderResult<DebugConfiguration>;
149
+ }
150
+
151
+ /**
152
+ * Represents a debug adapter executable and optional arguments and runtime options passed to it.
153
+ */
154
+ export class DebugAdapterExecutable {
155
+ /**
156
+ * Creates a description for a debug adapter based on an executable program.
157
+ *
158
+ * @param command The command or executable path that implements the debug adapter.
159
+ * @param args Optional arguments to be passed to the command or executable.
160
+ * @param options Optional options to be used when starting the command or executable.
161
+ */
162
+ constructor(
163
+ command: string,
164
+ args?: string[],
165
+ options?: DebugAdapterExecutableOptions
166
+ );
167
+
168
+ /**
169
+ * The command or path of the debug adapter executable.
170
+ * A command must be either an absolute path of an executable or the name of an command to be looked up via the PATH environment variable.
171
+ * The special value 'node' will be mapped to VS Code's built-in Node.js runtime.
172
+ */
173
+ readonly command: string;
174
+
175
+ /**
176
+ * The arguments passed to the debug adapter executable. Defaults to an empty array.
177
+ */
178
+ readonly args: string[];
179
+
180
+ /**
181
+ * Optional options to be used when the debug adapter is started.
182
+ * Defaults to undefined.
183
+ */
184
+ readonly options?: DebugAdapterExecutableOptions;
185
+ }
186
+
187
+ /**
188
+ * Options for a debug adapter executable.
189
+ */
190
+ export interface DebugAdapterExecutableOptions {
191
+ /**
192
+ * The additional environment of the executed program or shell. If omitted
193
+ * the parent process' environment is used. If provided it is merged with
194
+ * the parent process' environment.
195
+ */
196
+ env?: { [key: string]: string };
197
+
198
+ /**
199
+ * The current working directory for the executed debug adapter.
200
+ */
201
+ cwd?: string;
202
+ }
203
+
204
+ /**
205
+ * Represents a debug adapter running as a socket based server.
206
+ */
207
+ export class DebugAdapterServer {
208
+ /**
209
+ * The port.
210
+ */
211
+ readonly port: number;
212
+
213
+ /**
214
+ * The host.
215
+ */
216
+ readonly host?: string;
217
+
218
+ /**
219
+ * Create a description for a debug adapter running as a socket based server.
220
+ */
221
+ constructor(port: number, host?: string);
222
+ }
223
+
224
+ /**
225
+ * Represents a debug adapter running as a Named Pipe (on Windows)/UNIX Domain Socket (on non-Windows) based server.
226
+ */
227
+ export class DebugAdapterNamedPipeServer {
228
+ /**
229
+ * The path to the NamedPipe/UNIX Domain Socket.
230
+ */
231
+ readonly path: string;
232
+
233
+ /**
234
+ * Create a description for a debug adapter running as a socket based server.
235
+ */
236
+ constructor(path: string);
237
+ }
238
+
239
+ /**
240
+ * A debug adapter that implements the Debug Adapter Protocol can be registered with VS Code if it implements the DebugAdapter interface.
241
+ */
242
+ export interface DebugAdapter extends Disposable {
243
+ /**
244
+ * An event which fires after the debug adapter has sent a Debug Adapter Protocol message to VS Code.
245
+ * Messages can be requests, responses, or events.
246
+ */
247
+ readonly onDidSendMessage: Event<DebugProtocolMessage>;
248
+
249
+ /**
250
+ * Handle a Debug Adapter Protocol message.
251
+ * Messages can be requests, responses, or events.
252
+ * Results or errors are returned via onSendMessage events.
253
+ * @param message A Debug Adapter Protocol message
254
+ */
255
+ handleMessage(message: DebugProtocolMessage): void;
256
+ }
257
+
258
+ /**
259
+ * A DebugProtocolMessage is an opaque stand-in type for the [ProtocolMessage](https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage) type defined in the Debug Adapter Protocol.
260
+ */
261
+ export interface DebugProtocolMessage {
262
+ // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_ProtocolMessage).
263
+ }
264
+
265
+ /**
266
+ * A debug adapter descriptor for an inline implementation.
267
+ */
268
+ export class DebugAdapterInlineImplementation {
269
+ /**
270
+ * Create a descriptor for an inline implementation of a debug adapter.
271
+ */
272
+ constructor(implementation: DebugAdapter);
273
+ }
274
+
275
+ export type DebugAdapterDescriptor =
276
+ | DebugAdapterExecutable
277
+ | DebugAdapterServer
278
+ | DebugAdapterNamedPipeServer
279
+ | DebugAdapterInlineImplementation;
280
+
281
+ export interface DebugAdapterDescriptorFactory {
282
+ /**
283
+ * 'createDebugAdapterDescriptor' is called at the start of a debug session to provide details about the debug adapter to use.
284
+ * These details must be returned as objects of type [DebugAdapterDescriptor](#DebugAdapterDescriptor).
285
+ * Currently two types of debug adapters are supported:
286
+ * - a debug adapter executable is specified as a command path and arguments (see [DebugAdapterExecutable](#DebugAdapterExecutable)),
287
+ * - a debug adapter server reachable via a communication port (see [DebugAdapterServer](#DebugAdapterServer)).
288
+ * If the method is not implemented the default behavior is this:
289
+ * createDebugAdapter(session: DebugSession, executable: DebugAdapterExecutable) {
290
+ * if (typeof session.configuration.debugServer === 'number') {
291
+ * return new DebugAdapterServer(session.configuration.debugServer);
292
+ * }
293
+ * return executable;
294
+ * }
295
+ * @param session The [debug session](#DebugSession) for which the debug adapter will be used.
296
+ * @param executable The debug adapter's executable information as specified in the package.json (or undefined if no such information exists).
297
+ * @return a [debug adapter descriptor](#DebugAdapterDescriptor) or undefined.
298
+ */
299
+ createDebugAdapterDescriptor(
300
+ session: DebugSession,
301
+ executable: DebugAdapterExecutable | undefined
302
+ ): ProviderResult<DebugAdapterDescriptor>;
303
+ }
304
+
305
+ /**
306
+ * A Debug Adapter Tracker is a means to track the communication between VS Code and a Debug Adapter.
307
+ */
308
+ export interface DebugAdapterTracker {
309
+ /**
310
+ * A session with the debug adapter is about to be started.
311
+ */
312
+ onWillStartSession?(): void;
313
+ /**
314
+ * The debug adapter is about to receive a Debug Adapter Protocol message from VS Code.
315
+ */
316
+ onWillReceiveMessage?(message: any): void;
317
+ /**
318
+ * The debug adapter has sent a Debug Adapter Protocol message to VS Code.
319
+ */
320
+ onDidSendMessage?(message: any): void;
321
+ /**
322
+ * The debug adapter session is about to be stopped.
323
+ */
324
+ onWillStopSession?(): void;
325
+ /**
326
+ * An error with the debug adapter has occurred.
327
+ */
328
+ onError?(error: Error): void;
329
+ /**
330
+ * The debug adapter has exited with the given exit code or signal.
331
+ */
332
+ onExit?(code: number | undefined, signal: string | undefined): void;
333
+ }
334
+
335
+ export interface DebugAdapterTrackerFactory {
336
+ /**
337
+ * The method 'createDebugAdapterTracker' is called at the start of a debug session in order
338
+ * to return a "tracker" object that provides read-access to the communication between VS Code and a debug adapter.
339
+ *
340
+ * @param session The [debug session](#DebugSession) for which the debug adapter tracker will be used.
341
+ * @return A [debug adapter tracker](#DebugAdapterTracker) or undefined.
342
+ */
343
+ createDebugAdapterTracker(
344
+ session: DebugSession
345
+ ): ProviderResult<DebugAdapterTracker>;
346
+ }
347
+
348
+ /**
349
+ * Represents the debug console.
350
+ */
351
+ export interface DebugConsole {
352
+ /**
353
+ * Append the given value to the debug console.
354
+ *
355
+ * @param value A string, falsy values will not be printed.
356
+ */
357
+ append(value: string): void;
358
+
359
+ /**
360
+ * Append the given value and a line feed character
361
+ * to the debug console.
362
+ *
363
+ * @param value A string, falsy values will be printed.
364
+ */
365
+ appendLine(value: string): void;
366
+ }
367
+
368
+ /**
369
+ * An event describing the changes to the set of [breakpoints](#Breakpoint).
370
+ */
371
+ export interface BreakpointsChangeEvent {
372
+ /**
373
+ * Added breakpoints.
374
+ */
375
+ readonly added: ReadonlyArray<Breakpoint>;
376
+
377
+ /**
378
+ * Removed breakpoints.
379
+ */
380
+ readonly removed: ReadonlyArray<Breakpoint>;
381
+
382
+ /**
383
+ * Changed breakpoints.
384
+ */
385
+ readonly changed: ReadonlyArray<Breakpoint>;
386
+ }
387
+
388
+ /**
389
+ * The base class of all breakpoint types.
390
+ */
391
+ export class Breakpoint {
392
+ /**
393
+ * The unique ID of the breakpoint.
394
+ */
395
+ readonly id: string;
396
+ /**
397
+ * Is breakpoint enabled.
398
+ */
399
+ readonly enabled: boolean;
400
+ /**
401
+ * An optional expression for conditional breakpoints.
402
+ */
403
+ readonly condition?: string;
404
+ /**
405
+ * An optional expression that controls how many hits of the breakpoint are ignored.
406
+ */
407
+ readonly hitCondition?: string;
408
+ /**
409
+ * An optional message that gets logged when this breakpoint is hit. Embedded expressions within {} are interpolated by the debug adapter.
410
+ */
411
+ readonly logMessage?: string;
412
+
413
+ protected constructor(
414
+ enabled?: boolean,
415
+ condition?: string,
416
+ hitCondition?: string,
417
+ logMessage?: string
418
+ );
419
+ }
420
+
421
+ /**
422
+ * A breakpoint specified by a source location.
423
+ */
424
+ export class SourceBreakpoint extends Breakpoint {
425
+ /**
426
+ * The source and line position of this breakpoint.
427
+ */
428
+ readonly location: Location;
429
+
430
+ /**
431
+ * Create a new breakpoint for a source location.
432
+ */
433
+ constructor(
434
+ location: Location,
435
+ enabled?: boolean,
436
+ condition?: string,
437
+ hitCondition?: string,
438
+ logMessage?: string
439
+ );
440
+ }
441
+
442
+ /**
443
+ * A breakpoint specified by a function name.
444
+ */
445
+ export class FunctionBreakpoint extends Breakpoint {
446
+ /**
447
+ * The name of the function to which this breakpoint is attached.
448
+ */
449
+ readonly functionName: string;
450
+
451
+ /**
452
+ * Create a new function breakpoint.
453
+ */
454
+ constructor(
455
+ functionName: string,
456
+ enabled?: boolean,
457
+ condition?: string,
458
+ hitCondition?: string,
459
+ logMessage?: string
460
+ );
461
+ }
462
+
463
+ /**
464
+ * Debug console mode used by debug session, see [options](#DebugSessionOptions).
465
+ */
466
+ export enum DebugConsoleMode {
467
+ /**
468
+ * Debug session should have a separate debug console.
469
+ */
470
+ Separate = 0,
471
+
472
+ /**
473
+ * Debug session should share debug console with its parent session.
474
+ * This value has no effect for sessions which do not have a parent session.
475
+ */
476
+ MergeWithParent = 1,
477
+ }
478
+
479
+ /**
480
+ * Options for [starting a debug session](#debug.startDebugging).
481
+ */
482
+ export interface DebugSessionOptions {
483
+ /**
484
+ * When specified the newly created debug session is registered as a "child" session of this
485
+ * "parent" debug session.
486
+ */
487
+ parentSession?: DebugSession;
488
+
489
+ /**
490
+ * Controls whether this session should have a separate debug console or share it
491
+ * with the parent session. Has no effect for sessions which do not have a parent session.
492
+ * Defaults to Separate.
493
+ */
494
+ consoleMode?: DebugConsoleMode;
495
+
496
+ /**
497
+ * Controls whether this session should run without debugging, thus ignoring breakpoints.
498
+ * When this property is not specified, the value from the parent session (if there is one) is used.
499
+ */
500
+ noDebug?: boolean;
501
+
502
+ /**
503
+ * Controls if the debug session's parent session is shown in the CALL STACK view even if it has only a single child.
504
+ * By default, the debug session will never hide its parent.
505
+ * If compact is true, debug sessions with a single child are hidden in the CALL STACK view to make the tree more compact.
506
+ */
507
+ compact?: boolean;
508
+ }
509
+
510
+ /**
511
+ * A DebugConfigurationProviderTriggerKind specifies when the `provideDebugConfigurations` method of a `DebugConfigurationProvider` is triggered.
512
+ * Currently there are two situations: to provide the initial debug configurations for a newly created launch.json or
513
+ * to provide dynamically generated debug configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command).
514
+ * A trigger kind is used when registering a `DebugConfigurationProvider` with #debug.registerDebugConfigurationProvider.
515
+ */
516
+ export enum DebugConfigurationProviderTriggerKind {
517
+ /**
518
+ * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide the initial debug configurations for a newly created launch.json.
519
+ */
520
+ Initial = 1,
521
+ /**
522
+ * `DebugConfigurationProvider.provideDebugConfigurations` is called to provide dynamically generated debug configurations when the user asks for them through the UI (e.g. via the "Select and Start Debugging" command).
523
+ */
524
+ Dynamic = 2
525
+ }
526
+
527
+ /**
528
+ * A DebugProtocolSource is an opaque stand-in type for the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
529
+ */
530
+ export interface DebugProtocolSource {
531
+ // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source).
532
+ }
533
+
534
+ /**
535
+ * A DebugProtocolBreakpoint is an opaque stand-in type for the [Breakpoint](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Breakpoint) type defined in the Debug Adapter Protocol.
536
+ */
537
+ export interface DebugProtocolBreakpoint {
538
+ // Properties: see details [here](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Breakpoint).
539
+ }
540
+
541
+ /**
542
+ * Namespace for debug functionality.
543
+ */
544
+ export namespace debug {
545
+ /**
546
+ * The currently active [debug session](#DebugSession) or `undefined`. The active debug session is the one
547
+ * represented by the debug action floating window or the one currently shown in the drop down menu of the debug action floating window.
548
+ * If no debug session is active, the value is `undefined`.
549
+ */
550
+ export let activeDebugSession: DebugSession | undefined;
551
+
552
+ /**
553
+ * The currently active [debug console](#DebugConsole).
554
+ * If no debug session is active, output sent to the debug console is not shown.
555
+ */
556
+ export let activeDebugConsole: DebugConsole;
557
+
558
+ /**
559
+ * List of breakpoints.
560
+ */
561
+ export let breakpoints: Breakpoint[];
562
+
563
+ /**
564
+ * An [event](#Event) which fires when the [active debug session](#debug.activeDebugSession)
565
+ * has changed. *Note* that the event also fires when the active debug session changes
566
+ * to `undefined`.
567
+ */
568
+ export const onDidChangeActiveDebugSession: Event<DebugSession | undefined>;
569
+
570
+ /**
571
+ * An [event](#Event) which fires when a new [debug session](#DebugSession) has been started.
572
+ */
573
+ export const onDidStartDebugSession: Event<DebugSession>;
574
+
575
+ /**
576
+ * An [event](#Event) which fires when a custom DAP event is received from the [debug session](#DebugSession).
577
+ */
578
+ export const onDidReceiveDebugSessionCustomEvent: Event<DebugSessionCustomEvent>;
579
+
580
+ /**
581
+ * An [event](#Event) which fires when a [debug session](#DebugSession) has terminated.
582
+ */
583
+ export const onDidTerminateDebugSession: Event<DebugSession>;
584
+
585
+ /**
586
+ * An [event](#Event) that is emitted when the set of breakpoints is added, removed, or changed.
587
+ */
588
+ export const onDidChangeBreakpoints: Event<BreakpointsChangeEvent>;
589
+
590
+ /**
591
+ * Register a [debug configuration provider](#DebugConfigurationProvider) for a specific debug type.
592
+ * The optional [triggerKind](#DebugConfigurationProviderTriggerKind) can be used to specify when the `provideDebugConfigurations` method of the provider is triggered.
593
+ * Currently two trigger kinds are possible: with the value `Initial` (or if no trigger kind argument is given) the `provideDebugConfigurations` method is used to provide the initial debug configurations to be copied into a newly created launch.json.
594
+ * With the trigger kind `Dynamic` the `provideDebugConfigurations` method is used to dynamically determine debug configurations to be presented to the user (in addition to the static configurations from the launch.json).
595
+ * Please note that the `triggerKind` argument only applies to the `provideDebugConfigurations` method: so the `resolveDebugConfiguration` methods are not affected at all.
596
+ * Registering a single provider with resolve methods for different trigger kinds, results in the same resolve methods called multiple times.
597
+ * More than one provider can be registered for the same type.
598
+ *
599
+ * @param type The debug type for which the provider is registered.
600
+ * @param provider The [debug configuration provider](#DebugConfigurationProvider) to register.
601
+ * @param triggerKind The [trigger](#DebugConfigurationProviderTrigger) for which the 'provideDebugConfiguration' method of the provider is registered. If `triggerKind` is missing, the value `DebugConfigurationProviderTriggerKind.Initial` is assumed.
602
+ * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
603
+ */
604
+ export function registerDebugConfigurationProvider(
605
+ debugType: string,
606
+ provider: DebugConfigurationProvider,
607
+ triggerKind?: DebugConfigurationProviderTriggerKind
608
+ ): Disposable;
609
+
610
+ /**
611
+ * Register a [debug adapter descriptor factory](#DebugAdapterDescriptorFactory) for a specific debug type.
612
+ * An extension is only allowed to register a DebugAdapterDescriptorFactory for the debug type(s) defined by the extension. Otherwise an error is thrown.
613
+ * Registering more than one DebugAdapterDescriptorFactory for a debug type results in an error.
614
+ *
615
+ * @param debugType The debug type for which the factory is registered.
616
+ * @param factory The [debug adapter descriptor factory](#DebugAdapterDescriptorFactory) to register.
617
+ * @return A [disposable](#Disposable) that unregisters this factory when being disposed.
618
+ */
619
+ export function registerDebugAdapterDescriptorFactory(
620
+ debugType: string,
621
+ factory: DebugAdapterDescriptorFactory
622
+ ): Disposable;
623
+
624
+ /**
625
+ * Register a debug adapter tracker factory for the given debug type.
626
+ *
627
+ * @param debugType The debug type for which the factory is registered or '*' for matching all debug types.
628
+ * @param factory The [debug adapter tracker factory](#DebugAdapterTrackerFactory) to register.
629
+ * @return A [disposable](#Disposable) that unregisters this factory when being disposed.
630
+ */
631
+ export function registerDebugAdapterTrackerFactory(
632
+ debugType: string,
633
+ factory: DebugAdapterTrackerFactory
634
+ ): Disposable;
635
+
636
+ /**
637
+ * Start debugging by using either a named launch or named compound configuration,
638
+ * or by directly passing a [DebugConfiguration](#DebugConfiguration).
639
+ * The named configurations are looked up in '.vscode/launch.json' found in the given folder.
640
+ * Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.
641
+ * Folder specific variables used in the configuration (e.g. '${workspaceFolder}') are resolved against the given folder.
642
+ * @param folder The [workspace folder](#WorkspaceFolder) for looking up named configurations and resolving variables or `undefined` for a non-folder setup.
643
+ * @param nameOrConfiguration Either the name of a debug or compound configuration or a [DebugConfiguration](#DebugConfiguration) object.
644
+ * @param parent If specified the newly created debug session is registered as a "child" session of a "parent" debug session.
645
+ * @return A thenable that resolves when debugging could be successfully started.
646
+ */
647
+ export function startDebugging(
648
+ folder: WorkspaceFolder | undefined,
649
+ nameOrConfiguration: string | DebugConfiguration,
650
+ parentSessionOrOptions?: DebugSession | DebugSessionOptions
651
+ ): Thenable<boolean>;
652
+
653
+ /**
654
+ * Stop the given debug session or stop all debug sessions if session is omitted.
655
+ * @param session The [debug session](#DebugSession) to stop; if omitted all sessions are stopped.
656
+ */
657
+ export function stopDebugging(session?: DebugSession): Thenable<void>;
658
+
659
+ /**
660
+ * Add breakpoints.
661
+ * @param breakpoints The breakpoints to add.
662
+ */
663
+ export function addBreakpoints(breakpoints: Breakpoint[]): void;
664
+
665
+ /**
666
+ * Remove breakpoints.
667
+ * @param breakpoints The breakpoints to remove.
668
+ */
669
+ export function removeBreakpoints(breakpoints: Breakpoint[]): void;
670
+
671
+ /**
672
+ * Converts a "Source" descriptor object received via the Debug Adapter Protocol into a Uri that can be used to load its contents.
673
+ * If the source descriptor is based on a path, a file Uri is returned.
674
+ * If the source descriptor uses a reference number, a specific debug Uri (scheme 'debug') is constructed that requires a corresponding VS Code ContentProvider and a running debug session
675
+ *
676
+ * If the "Source" descriptor has insufficient information for creating the Uri, an error is thrown.
677
+ *
678
+ * @param source An object conforming to the [Source](https://microsoft.github.io/debug-adapter-protocol/specification#Types_Source) type defined in the Debug Adapter Protocol.
679
+ * @param session An optional debug session that will be used when the source descriptor uses a reference number to load the contents from an active debug session.
680
+ * @return A uri that can be used to load the contents of the source.
681
+ */
682
+ export function asDebugSourceUri(source: DebugProtocolSource, session?: DebugSession): Uri;
683
+ }
684
+ }