BrainGrid

Specification

Defines a common protocol for debug adapters.

Used in: 1 reposUpdated: recently

#title: Specification layout: specification sectionid: specification toc: true schemaTitle: Debug Adapter Protocol

The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.

A machine-readable JSON schema can be found here.

The change history of the specification lives here.

#Base Protocol

#ProtocolMessage

Base class of requests, responses, and events.

1interface ProtocolMessage {
2  /**
3   * Sequence number of the message (also known as message ID). The `seq` for
4   * the first message sent by a client or debug adapter is 1, and for each
5   * subsequent message is 1 greater than the previous message sent by that
6   * actor. `seq` can be used to order requests, responses, and events, and to
7   * associate requests with their corresponding responses. For protocol
8   * messages of type `request` the sequence number can be used to cancel the
9   * request.
10   */
11  seq: number;
12
13  /**
14   * Message type.
15   * Values: 'request', 'response', 'event', etc.
16   */
17  type: 'request' | 'response' | 'event' | string;
18}

#Request

A client or debug adapter initiated request.

1interface Request extends ProtocolMessage {
2  type: 'request';
3
4  /**
5   * The command to execute.
6   */
7  command: string;
8
9  /**
10   * Object containing arguments for the command.
11   */
12  arguments?: any;
13}

#Event

A debug adapter initiated event.

1interface Event extends ProtocolMessage {
2  type: 'event';
3
4  /**
5   * Type of event.
6   */
7  event: string;
8
9  /**
10   * Event-specific information.
11   */
12  body?: any;
13}

#Response

Response for a request.

1interface Response extends ProtocolMessage {
2  type: 'response';
3
4  /**
5   * Sequence number of the corresponding request.
6   */
7  request_seq: number;
8
9  /**
10   * Outcome of the request.
11   * If true, the request was successful and the `body` attribute may contain
12   * the result of the request.
13   * If the value is false, the attribute `message` contains the error in short
14   * form and the `body` may contain additional information (see
15   * `ErrorResponse.body.error`).
16   */
17  success: boolean;
18
19  /**
20   * The command requested.
21   */
22  command: string;
23
24  /**
25   * Contains the raw error in short form if `success` is false.
26   * This raw error might be interpreted by the client and is not shown in the
27   * UI.
28   * Some predefined values exist.
29   * Values:
30   * 'cancelled': the request was cancelled.
31   * 'notStopped': the request may be retried once the adapter is in a 'stopped'
32   * state.
33   * etc.
34   */
35  message?: 'cancelled' | 'notStopped' | string;
36
37  /**
38   * Contains request result if success is true and error details if success is
39   * false.
40   */
41  body?: any;
42}

#ErrorResponse

On error (whenever success is false), the body can provide more details.

1interface ErrorResponse extends Response {
2  body: {
3    /**
4     * A structured error message.
5     */
6    error?: Message;
7  };
8}

#:leftwards_arrow_with_hook: Cancel Request

The cancel request is used by the client 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 corresponding capability supportsCancelRequest is true.

This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.

The cancel request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.

The request that got cancelled still needs to send a response back. This can either be a normal result (success attribute true) or an error response (success attribute false and the message set to cancelled).

Returning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.

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.

1interface CancelRequest extends Request {
2  command: 'cancel';
3
4  arguments?: CancelArguments;
5}

Arguments for cancel request.

1interface CancelArguments {
2  /**
3   * The ID (attribute `seq`) of the request to cancel. If missing no request is
4   * cancelled.
5   * Both a `requestId` and a `progressId` can be specified in one request.
6   */
7  requestId?: number;
8
9  /**
10   * The ID (attribute `progressId`) of the progress to cancel. If missing no
11   * progress is cancelled.
12   * Both a `requestId` and a `progressId` can be specified in one request.
13   */
14  progressId?: string;
15}

Response to cancel request. This is just an acknowledgement, so no body field is required.

1interface CancelResponse extends Response {
2}

#Events

#:arrow_left: Initialized Event

This event indicates that the debug adapter is ready to accept configuration requests (e.g. setBreakpoints, setExceptionBreakpoints).

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)
  • client sends zero or more setBreakpoints requests
  • client sends one setFunctionBreakpoints request (if corresponding capability supportsFunctionBreakpoints is true)
  • client sends a setExceptionBreakpoints request if one or more exceptionBreakpointFilters have been defined (or if supportsConfigurationDoneRequest is not true)
  • client sends other future configuration requests
  • client sends one configurationDone request to indicate the end of the configuration.
1interface InitializedEvent extends Event {
2  event: 'initialized';
3}

#:arrow_left: Stopped Event

The event indicates that the execution of the debuggee has stopped due to some condition.

This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.

1interface StoppedEvent extends Event {
2  event: 'stopped';
3
4  body: {
5    /**
6     * The reason for the event.
7     * For backward compatibility this string is shown in the UI if the
8     * `description` attribute is missing (but it must not be translated).
9     * Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto',
10     * 'function breakpoint', 'data breakpoint', 'instruction breakpoint', etc.
11     */
12    reason: 'step' | 'breakpoint' | 'exception' | 'pause' | 'entry' | 'goto'
13        | 'function breakpoint' | 'data breakpoint' | 'instruction breakpoint'
14        | string;
15
16    /**
17     * The full reason for the event, e.g. 'Paused on exception'. This string is
18     * shown in the UI as is and can be translated.
19     */
20    description?: string;
21
22    /**
23     * The thread which was stopped.
24     */
25    threadId?: number;
26
27    /**
28     * A value of true hints to the client that this event should not change the
29     * focus.
30     */
31    preserveFocusHint?: boolean;
32
33    /**
34     * Additional information. E.g. if reason is `exception`, text contains the
35     * exception name. This string is shown in the UI.
36     */
37    text?: string;
38
39    /**
40     * If `allThreadsStopped` is true, a debug adapter can announce that all
41     * threads have stopped.
42     * - The client should use this information to enable that all threads can
43     * be expanded to access their stacktraces.
44     * - If the attribute is missing or false, only the thread with the given
45     * `threadId` can be expanded.
46     */
47    allThreadsStopped?: boolean;
48
49    /**
50     * Ids of the breakpoints that triggered the event. In most cases there is
51     * only a single breakpoint but here are some examples for multiple
52     * breakpoints:
53     * - Different types of breakpoints map to the same location.
54     * - Multiple source breakpoints get collapsed to the same instruction by
55     * the compiler/runtime.
56     * - Multiple function breakpoints with different function names map to the
57     * same location.
58     */
59    hitBreakpointIds?: number[];
60  };
61}

#:arrow_left: Continued Event

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.

1interface ContinuedEvent extends Event {
2  event: 'continued';
3
4  body: {
5    /**
6     * The thread which was continued.
7     */
8    threadId: number;
9
10    /**
11     * If omitted or set to `true`, this event signals to the client that all
12     * threads have been resumed. The value `false` indicates that not all
13     * threads were resumed.
14     */
15    allThreadsContinued?: boolean;
16  };
17}

#:arrow_left: Exited Event

The event indicates that the debuggee has exited and returns its exit code.

1interface ExitedEvent extends Event {
2  event: 'exited';
3
4  body: {
5    /**
6     * The exit code returned from the debuggee.
7     */
8    exitCode: number;
9  };
10}

#:arrow_left: Terminated Event

The event indicates that debugging of the debuggee has terminated. This does not mean that the debuggee itself has exited.

1interface TerminatedEvent extends Event {
2  event: 'terminated';
3
4  body?: {
5    /**
6     * A debug adapter may set `restart` to true (or to an arbitrary object) to
7     * request that the client restarts the session.
8     * The value is not interpreted by the client and passed unmodified as an
9     * attribute `__restart` to the `launch` and `attach` requests.
10     */
11    restart?: any;
12  };
13}

#:arrow_left: Thread Event

The event indicates that a thread has started or exited.

1interface ThreadEvent extends Event {
2  event: 'thread';
3
4  body: {
5    /**
6     * The reason for the event.
7     * Values: 'started', 'exited', etc.
8     */
9    reason: 'started' | 'exited' | string;
10
11    /**
12     * The identifier of the thread.
13     */
14    threadId: number;
15  };
16}

#:arrow_left: Output Event

The event indicates that the target has produced some output.

1interface OutputEvent extends Event {
2  event: 'output';
3
4  body: {
5    /**
6     * The output category. If not specified or if the category is not
7     * understood by the client, `console` is assumed.
8     * Values:
9     * 'console': Show the output in the client's default message UI, e.g. a
10     * 'debug console'. This category should only be used for informational
11     * output from the debugger (as opposed to the debuggee).
12     * 'important': A hint for the client to show the output in the client's UI
13     * for important and highly visible information, e.g. as a popup
14     * notification. This category should only be used for important messages
15     * from the debugger (as opposed to the debuggee). Since this category value
16     * is a hint, clients might ignore the hint and assume the `console`
17     * category.
18     * 'stdout': Show the output as normal program output from the debuggee.
19     * 'stderr': Show the output as error program output from the debuggee.
20     * 'telemetry': Send the output to telemetry instead of showing it to the
21     * user.
22     * etc.
23     */
24    category?: 'console' | 'important' | 'stdout' | 'stderr' | 'telemetry' | string;
25
26    /**
27     * The output to report.
28     * 
29     * ANSI escape sequences may be used to influence text color and styling if
30     * `supportsANSIStyling` is present in both the adapter's `Capabilities` and
31     * the client's `InitializeRequestArguments`. A client may strip any
32     * unrecognized ANSI sequences.
33     * 
34     * If the `supportsANSIStyling` capabilities are not both true, then the
35     * client should display the output literally.
36     */
37    output: string;
38
39    /**
40     * Support for keeping an output log organized by grouping related messages.
41     * Values:
42     * 'start': Start a new group in expanded mode. Subsequent output events are
43     * members of the group and should be shown indented.
44     * The `output` attribute becomes the name of the group and is not indented.
45     * 'startCollapsed': Start a new group in collapsed mode. Subsequent output
46     * events are members of the group and should be shown indented (as soon as
47     * the group is expanded).
48     * The `output` attribute becomes the name of the group and is not indented.
49     * 'end': End the current group and decrease the indentation of subsequent
50     * output events.
51     * A non-empty `output` attribute is shown as the unindented end of the
52     * group.
53     */
54    group?: 'start' | 'startCollapsed' | 'end';
55
56    /**
57     * If an attribute `variablesReference` exists and its value is > 0, the
58     * output contains objects which can be retrieved by passing
59     * `variablesReference` to the `variables` request as long as execution
60     * remains suspended. See 'Lifetime of Object References' in the Overview
61     * section for details.
62     */
63    variablesReference?: number;
64
65    /**
66     * The source location where the output was produced.
67     */
68    source?: Source;
69
70    /**
71     * The source location's line where the output was produced.
72     */
73    line?: number;
74
75    /**
76     * The position in `line` where the output was produced. It is measured in
77     * UTF-16 code units and the client capability `columnsStartAt1` determines
78     * whether it is 0- or 1-based.
79     */
80    column?: number;
81
82    /**
83     * Additional data to report. For the `telemetry` category the data is sent
84     * to telemetry, for the other categories the data is shown in JSON format.
85     */
86    data?: any;
87
88    /**
89     * A reference that allows the client to request the location where the new
90     * value is declared. For example, if the logged value is function pointer,
91     * the adapter may be able to look up the function's location. This should
92     * be present only if the adapter is likely to be able to resolve the
93     * location.
94     * 
95     * This reference shares the same lifetime as the `variablesReference`. See
96     * 'Lifetime of Object References' in the Overview section for details.
97     */
98    locationReference?: number;
99  };
100}

#:arrow_left: Breakpoint Event

The event indicates that some information about a breakpoint has changed.

1interface BreakpointEvent extends Event {
2  event: 'breakpoint';
3
4  body: {
5    /**
6     * The reason for the event.
7     * Values: 'changed', 'new', 'removed', etc.
8     */
9    reason: 'changed' | 'new' | 'removed' | string;
10
11    /**
12     * The `id` attribute is used to find the target breakpoint, the other
13     * attributes are used as the new values.
14     */
15    breakpoint: Breakpoint;
16  };
17}

#:arrow_left: Module Event

The event indicates that some information about a module has changed.

1interface ModuleEvent extends Event {
2  event: 'module';
3
4  body: {
5    /**
6     * The reason for the event.
7     * Values: 'new', 'changed', 'removed'
8     */
9    reason: 'new' | 'changed' | 'removed';
10
11    /**
12     * The new, changed, or removed module. In case of `removed` only the module
13     * id is used.
14     */
15    module: Module;
16  };
17}

#:arrow_left: LoadedSource Event

The event indicates that some source has been added, changed, or removed from the set of all loaded sources.

1interface LoadedSourceEvent extends Event {
2  event: 'loadedSource';
3
4  body: {
5    /**
6     * The reason for the event.
7     * Values: 'new', 'changed', 'removed'
8     */
9    reason: 'new' | 'changed' | 'removed';
10
11    /**
12     * The new, changed, or removed source.
13     */
14    source: Source;
15  };
16}

#:arrow_left: Process Event

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.

1interface ProcessEvent extends Event {
2  event: 'process';
3
4  body: {
5    /**
6     * The logical name of the process. This is usually the full path to
7     * process's executable file. Example: /home/example/myproj/program.js.
8     */
9    name: string;
10
11    /**
12     * The process ID of the debugged process, as assigned by the operating
13     * system. This property should be omitted for logical processes that do not
14     * map to operating system processes on the machine.
15     */
16    systemProcessId?: number;
17
18    /**
19     * If true, the process is running on the same computer as the debug
20     * adapter.
21     */
22    isLocalProcess?: boolean;
23
24    /**
25     * Describes how the debug engine started debugging this process.
26     * Values:
27     * 'launch': Process was launched under the debugger.
28     * 'attach': Debugger attached to an existing process.
29     * 'attachForSuspendedLaunch': A project launcher component has launched a
30     * new process in a suspended state and then asked the debugger to attach.
31     */
32    startMethod?: 'launch' | 'attach' | 'attachForSuspendedLaunch';
33
34    /**
35     * The size of a pointer or address for this process, in bits. This value
36     * may be used by clients when formatting addresses for display.
37     */
38    pointerSize?: number;
39  };
40}

#:arrow_left: Capabilities Event

The event indicates that one or more capabilities have changed.

Since the capabilities are dependent on the client 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 client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.

Only changed capabilities need to be included, all other capabilities keep their values.

1interface CapabilitiesEvent extends Event {
2  event: 'capabilities';
3
4  body: {
5    /**
6     * The set of updated capabilities.
7     */
8    capabilities: Capabilities;
9  };
10}

#:arrow_left: ProgressStart Event

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 corresponding capability supportsProgressReporting is true.

1interface ProgressStartEvent extends Event {
2  event: 'progressStart';
3
4  body: {
5    /**
6     * An ID that can be used in subsequent `progressUpdate` and `progressEnd`
7     * events to make them refer to the same progress reporting.
8     * IDs must be unique within a debug session.
9     */
10    progressId: string;
11
12    /**
13     * Short title of the progress reporting. Shown in the UI to describe the
14     * long running operation.
15     */
16    title: string;
17
18    /**
19     * The request ID that this progress report is related to. If specified a
20     * debug adapter is expected to emit progress events for the long running
21     * request until the request has been either completed or cancelled.
22     * If the request ID is omitted, the progress report is assumed to be
23     * related to some general activity of the debug adapter.
24     */
25    requestId?: number;
26
27    /**
28     * If true, the request that reports progress may be cancelled with a
29     * `cancel` request.
30     * So this property basically controls whether the client should use UX that
31     * supports cancellation.
32     * Clients that don't support cancellation are allowed to ignore the
33     * setting.
34     */
35    cancellable?: boolean;
36
37    /**
38     * More detailed progress message.
39     */
40    message?: string;
41
42    /**
43     * Progress percentage to display (value range: 0 to 100). If omitted no
44     * percentage is shown.
45     */
46    percentage?: number;
47  };
48}

#:arrow_left: ProgressUpdate Event

The event signals that the progress reporting needs to be 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 corresponding capability supportsProgressReporting is true.

1interface ProgressUpdateEvent extends Event {
2  event: 'progressUpdate';
3
4  body: {
5    /**
6     * The ID that was introduced in the initial `progressStart` event.
7     */
8    progressId: string;
9
10    /**
11     * More detailed progress message. If omitted, the previous message (if any)
12     * is used.
13     */
14    message?: string;
15
16    /**
17     * Progress percentage to display (value range: 0 to 100). If omitted no
18     * percentage is shown.
19     */
20    percentage?: number;
21  };
22}

#:arrow_left: ProgressEnd Event

The event signals the end of the progress reporting with a final message.

This event should only be sent if the corresponding capability supportsProgressReporting is true.

1interface ProgressEndEvent extends Event {
2  event: 'progressEnd';
3
4  body: {
5    /**
6     * The ID that was introduced in the initial `ProgressStartEvent`.
7     */
8    progressId: string;
9
10    /**
11     * More detailed progress message. If omitted, the previous message (if any)
12     * is used.
13     */
14    message?: string;
15  };
16}

#:arrow_left: Invalidated Event

This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.

Debug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.

This event should only be sent if the corresponding capability supportsInvalidatedEvent is true.

1interface InvalidatedEvent extends Event {
2  event: 'invalidated';
3
4  body: {
5    /**
6     * Set of logical areas that got invalidated. This property has a hint
7     * characteristic: a client can only be expected to make a 'best effort' in
8     * honoring the areas but there are no guarantees. If this property is
9     * missing, empty, or if values are not understood, the client should assume
10     * a single value `all`.
11     */
12    areas?: InvalidatedAreas[];
13
14    /**
15     * If specified, the client only needs to refetch data related to this
16     * thread.
17     */
18    threadId?: number;
19
20    /**
21     * If specified, the client only needs to refetch data related to this stack
22     * frame (and the `threadId` is ignored).
23     */
24    stackFrameId?: number;
25  };
26}

#:arrow_left: Memory Event

This event indicates that some memory range has been updated. It should only be sent if the corresponding capability supportsMemoryEvent is true.

Clients typically react to the event by re-issuing a readMemory request if they show the memory identified by the memoryReference and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.

Debug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like setVariable or setExpression. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.

1interface MemoryEvent extends Event {
2  event: 'memory';
3
4  body: {
5    /**
6     * Memory reference of a memory range that has been updated.
7     */
8    memoryReference: string;
9
10    /**
11     * Starting offset in bytes where memory has been updated. Can be negative.
12     */
13    offset: number;
14
15    /**
16     * Number of bytes updated.
17     */
18    count: number;
19  };
20}

#Reverse Requests

#:arrow_right_hook: RunInTerminal Request

This 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 corresponding client capability supportsRunInTerminalRequest is true.

Client implementations of runInTerminal are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the runInTerminal request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.

Some users may wish to take advantage of shell processing in the argument strings. For clients which implement runInTerminal using an intermediary shell, the argsCanBeInterpretedByShell property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.

1interface RunInTerminalRequest extends Request {
2  command: 'runInTerminal';
3
4  arguments: RunInTerminalRequestArguments;
5}

Arguments for runInTerminal request.

1interface RunInTerminalRequestArguments {
2  /**
3   * What kind of terminal to launch. Defaults to `integrated` if not specified.
4   * Values: 'integrated', 'external'
5   */
6  kind?: 'integrated' | 'external';
7
8  /**
9   * Title of the terminal.
10   */
11  title?: string;
12
13  /**
14   * Working directory for the command. For non-empty, valid paths this
15   * typically results in execution of a change directory command.
16   */
17  cwd: string;
18
19  /**
20   * List of arguments. The first argument is the command to run.
21   */
22  args: string[];
23
24  /**
25   * Environment key-value pairs that are added to or removed from the default
26   * environment.
27   */
28  env?: { [key: string]: string | null; };
29
30  /**
31   * This property should only be set if the corresponding capability
32   * `supportsArgsCanBeInterpretedByShell` is true. If the client uses an
33   * intermediary shell to launch the application, then the client must not
34   * attempt to escape characters with special meanings for the shell. The user
35   * is fully responsible for escaping as needed and that arguments using
36   * special characters may not be portable across shells.
37   */
38  argsCanBeInterpretedByShell?: boolean;
39}

Response to runInTerminal request.

1interface RunInTerminalResponse extends Response {
2  body: {
3    /**
4     * The process ID. The value should be less than or equal to 2147483647
5     * (2^31-1).
6     */
7    processId?: number;
8
9    /**
10     * The process ID of the terminal shell. The value should be less than or
11     * equal to 2147483647 (2^31-1).
12     */
13    shellProcessId?: number;
14  };
15}

#:leftwards_arrow_with_hook: StartDebugging Request

This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.

This request should only be sent if the corresponding client capability supportsStartDebuggingRequest is true.

A client implementation of startDebugging should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.

1interface StartDebuggingRequest extends Request {
2  command: 'startDebugging';
3
4  arguments: StartDebuggingRequestArguments;
5}

Arguments for startDebugging request.

1interface StartDebuggingRequestArguments {
2  /**
3   * Arguments passed to the new debug session. The arguments must only contain
4   * properties understood by the `launch` or `attach` requests of the debug
5   * adapter and they must not contain any client-specific properties (e.g.
6   * `type`) or client-specific features (e.g. substitutable 'variables').
7   */
8  configuration: { [key: string]: any; };
9
10  /**
11   * Indicates whether the new debug session should be started with a `launch`
12   * or `attach` request.
13   * Values: 'launch', 'attach'
14   */
15  request: 'launch' | 'attach';
16}

Response to startDebugging request. This is just an acknowledgement, so no body field is required.

1interface StartDebuggingResponse extends Response {
2}

#Requests

#:leftwards_arrow_with_hook: Initialize Request

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 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.

1interface InitializeRequest extends Request {
2  command: 'initialize';
3
4  arguments: InitializeRequestArguments;
5}

Arguments for initialize request.

1interface InitializeRequestArguments {
2  /**
3   * The ID of the client using this adapter.
4   */
5  clientID?: string;
6
7  /**
8   * The human-readable name of the client using this adapter.
9   */
10  clientName?: string;
11
12  /**
13   * The ID of the debug adapter.
14   */
15  adapterID: string;
16
17  /**
18   * The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH.
19   */
20  locale?: string;
21
22  /**
23   * If true all line numbers are 1-based (default).
24   */
25  linesStartAt1?: boolean;
26
27  /**
28   * If true all column numbers are 1-based (default).
29   */
30  columnsStartAt1?: boolean;
31
32  /**
33   * Determines in what format paths are specified. The default is `path`, which
34   * is the native format.
35   * Values: 'path', 'uri', etc.
36   */
37  pathFormat?: 'path' | 'uri' | string;
38
39  /**
40   * Client supports the `type` attribute for variables.
41   */
42  supportsVariableType?: boolean;
43
44  /**
45   * Client supports the paging of variables.
46   */
47  supportsVariablePaging?: boolean;
48
49  /**
50   * Client supports the `runInTerminal` request.
51   */
52  supportsRunInTerminalRequest?: boolean;
53
54  /**
55   * Client supports memory references.
56   */
57  supportsMemoryReferences?: boolean;
58
59  /**
60   * Client supports progress reporting.
61   */
62  supportsProgressReporting?: boolean;
63
64  /**
65   * Client supports the `invalidated` event.
66   */
67  supportsInvalidatedEvent?: boolean;
68
69  /**
70   * Client supports the `memory` event.
71   */
72  supportsMemoryEvent?: boolean;
73
74  /**
75   * Client supports the `argsCanBeInterpretedByShell` attribute on the
76   * `runInTerminal` request.
77   */
78  supportsArgsCanBeInterpretedByShell?: boolean;
79
80  /**
81   * Client supports the `startDebugging` request.
82   */
83  supportsStartDebuggingRequest?: boolean;
84
85  /**
86   * The client will interpret ANSI escape sequences in the display of
87   * `OutputEvent.output` and `Variable.value` fields when
88   * `Capabilities.supportsANSIStyling` is also enabled.
89   */
90  supportsANSIStyling?: boolean;
91}

Response to initialize request.

1interface InitializeResponse extends Response {
2  /**
3   * The capabilities of this debug adapter.
4   */
5  body?: Capabilities;
6}

#:leftwards_arrow_with_hook: ConfigurationDone Request

This 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 corresponding capability supportsConfigurationDoneRequest is true.

1interface ConfigurationDoneRequest extends Request {
2  command: 'configurationDone';
3
4  arguments?: ConfigurationDoneArguments;
5}

Arguments for configurationDone request.

1interface ConfigurationDoneArguments {
2}

Response to configurationDone request. This is just an acknowledgement, so no body field is required.

1interface ConfigurationDoneResponse extends Response {
2}

#:leftwards_arrow_with_hook: Launch Request

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.

1interface LaunchRequest extends Request {
2  command: 'launch';
3
4  arguments: LaunchRequestArguments;
5}

Arguments for launch request. Additional attributes are implementation specific.

1interface LaunchRequestArguments {
2  /**
3   * If true, the launch request should launch the program without enabling
4   * debugging.
5   */
6  noDebug?: boolean;
7
8  /**
9   * Arbitrary data from the previous, restarted session.
10   * The data is sent as the `restart` attribute of the `terminated` event.
11   * The client should leave the data intact.
12   */
13  __restart?: any;
14}

Response to launch request. This is just an acknowledgement, so no body field is required.

1interface LaunchResponse extends Response {
2}

#:leftwards_arrow_with_hook: Attach Request

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.

1interface AttachRequest extends Request {
2  command: 'attach';
3
4  arguments: AttachRequestArguments;
5}

Arguments for attach request. Additional attributes are implementation specific.

1interface AttachRequestArguments {
2  /**
3   * Arbitrary data from the previous, restarted session.
4   * The data is sent as the `restart` attribute of the `terminated` event.
5   * The client should leave the data intact.
6   */
7  __restart?: any;
8}

Response to attach request. This is just an acknowledgement, so no body field is required.

1interface AttachResponse extends Response {
2}

#:leftwards_arrow_with_hook: Restart Request

Restarts a debug session. Clients should only call this request if the corresponding capability supportsRestartRequest is true.

If the capability is missing or has the value false, a typical client emulates restart by terminating the debug adapter first and then launching it anew.

1interface RestartRequest extends Request {
2  command: 'restart';
3
4  arguments?: RestartArguments;
5}

Arguments for restart request.

1interface RestartArguments {
2  /**
3   * The latest version of the `launch` or `attach` configuration.
4   */
5  arguments?: LaunchRequestArguments | AttachRequestArguments;
6}

Response to restart request. This is just an acknowledgement, so no body field is required.

1interface RestartResponse extends Response {
2}

#:leftwards_arrow_with_hook: Disconnect Request

The disconnect request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).

In addition, the debug adapter must terminate the debuggee if it was started with the launch request. If an attach request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.

This implicit behavior of when to terminate the debuggee can be overridden with the terminateDebuggee argument (which is only supported by a debug adapter if the corresponding capability supportTerminateDebuggee is true).

1interface DisconnectRequest extends Request {
2  command: 'disconnect';
3
4  arguments?: DisconnectArguments;
5}

Arguments for disconnect request.

1interface DisconnectArguments {
2  /**
3   * A value of true indicates that this `disconnect` request is part of a
4   * restart sequence.
5   */
6  restart?: boolean;
7
8  /**
9   * Indicates whether the debuggee should be terminated when the debugger is
10   * disconnected.
11   * If unspecified, the debug adapter is free to do whatever it thinks is best.
12   * The attribute is only honored by a debug adapter if the corresponding
13   * capability `supportTerminateDebuggee` is true.
14   */
15  terminateDebuggee?: boolean;
16
17  /**
18   * Indicates whether the debuggee should stay suspended when the debugger is
19   * disconnected.
20   * If unspecified, the debuggee should resume execution.
21   * The attribute is only honored by a debug adapter if the corresponding
22   * capability `supportSuspendDebuggee` is true.
23   */
24  suspendDebuggee?: boolean;
25}

Response to disconnect request. This is just an acknowledgement, so no body field is required.

1interface DisconnectResponse extends Response {
2}

#:leftwards_arrow_with_hook: Terminate Request

The terminate request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability supportsTerminateRequest is true.

Typically a debug adapter implements terminate by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.

Please note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.

Clients can surface the terminate request as an explicit command or they can integrate it into a two stage Stop command that first sends terminate to request a graceful shutdown, and if that fails uses disconnect for a forceful shutdown.

1interface TerminateRequest extends Request {
2  command: 'terminate';
3
4  arguments?: TerminateArguments;
5}

Arguments for terminate request.

1interface TerminateArguments {
2  /**
3   * A value of true indicates that this `terminate` request is part of a
4   * restart sequence.
5   */
6  restart?: boolean;
7}

Response to terminate request. This is just an acknowledgement, so no body field is required.

1interface TerminateResponse extends Response {
2}

#:leftwards_arrow_with_hook: BreakpointLocations Request

The breakpointLocations request returns all possible locations for source breakpoints in a given range.

Clients should only call this request if the corresponding capability supportsBreakpointLocationsRequest is true.

1interface BreakpointLocationsRequest extends Request {
2  command: 'breakpointLocations';
3
4  arguments?: BreakpointLocationsArguments;
5}

Arguments for breakpointLocations request.

1interface BreakpointLocationsArguments {
2  /**
3   * The source location of the breakpoints; either `source.path` or
4   * `source.sourceReference` must be specified.
5   */
6  source: Source;
7
8  /**
9   * Start line of range to search possible breakpoint locations in. If only the
10   * line is specified, the request returns all possible locations in that line.
11   */
12  line: number;
13
14  /**
15   * Start position within `line` to search possible breakpoint locations in. It
16   * is measured in UTF-16 code units and the client capability
17   * `columnsStartAt1` determines whether it is 0- or 1-based. If no column is
18   * given, the first position in the start line is assumed.
19   */
20  column?: number;
21
22  /**
23   * End line of range to search possible breakpoint locations in. If no end
24   * line is given, then the end line is assumed to be the start line.
25   */
26  endLine?: number;
27
28  /**
29   * End position within `endLine` to search possible breakpoint locations in.
30   * It is measured in UTF-16 code units and the client capability
31   * `columnsStartAt1` determines whether it is 0- or 1-based. If no end column
32   * is given, the last position in the end line is assumed.
33   */
34  endColumn?: number;
35}

Response to breakpointLocations request.

Contains possible locations for source breakpoints.

1interface BreakpointLocationsResponse extends Response {
2  body: {
3    /**
4     * Sorted set of possible breakpoint locations.
5     */
6    breakpoints: BreakpointLocation[];
7  };
8}

#:leftwards_arrow_with_hook: SetBreakpoints Request

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.

1interface SetBreakpointsRequest extends Request {
2  command: 'setBreakpoints';
3
4  arguments: SetBreakpointsArguments;
5}

Arguments for setBreakpoints request.

1interface SetBreakpointsArguments {
2  /**
3   * The source location of the breakpoints; either `source.path` or
4   * `source.sourceReference` must be specified.
5   */
6  source: Source;
7
8  /**
9   * The code locations of the breakpoints.
10   */
11  breakpoints?: SourceBreakpoint[];
12
13  /**
14   * Deprecated: The code locations of the breakpoints.
15   */
16  lines?: number[];
17
18  /**
19   * A value of true indicates that the underlying source has been modified
20   * which results in new breakpoint locations.
21   */
22  sourceModified?: boolean;
23}

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.

1interface SetBreakpointsResponse extends Response {
2  body: {
3    /**
4     * Information about the breakpoints.
5     * The array elements are in the same order as the elements of the
6     * `breakpoints` (or the deprecated `lines`) array in the arguments.
7     */
8    breakpoints: Breakpoint[];
9  };
10}

#:leftwards_arrow_with_hook: SetFunctionBreakpoints Request

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 corresponding capability supportsFunctionBreakpoints is true.

1interface SetFunctionBreakpointsRequest extends Request {
2  command: 'setFunctionBreakpoints';
3
4  arguments: SetFunctionBreakpointsArguments;
5}

Arguments for setFunctionBreakpoints request.

1interface SetFunctionBreakpointsArguments {
2  /**
3   * The function names of the breakpoints.
4   */
5  breakpoints: FunctionBreakpoint[];
6}

Response to setFunctionBreakpoints request.

Returned is information about each breakpoint created by this request.

1interface SetFunctionBreakpointsResponse extends Response {
2  body: {
3    /**
4     * Information about the breakpoints. The array elements correspond to the
5     * elements of the `breakpoints` array.
6     */
7    breakpoints: Breakpoint[];
8  };
9}

#:leftwards_arrow_with_hook: SetExceptionBreakpoints Request

The request configures the debugger's response to thrown exceptions. Each of the filters, filterOptions, and exceptionOptions in the request are independent configurations to a debug adapter indicating a kind of exception to catch. An exception thrown in a program should result in a stopped event from the debug adapter (with reason exception) if any of the configured filters match.

Clients should only call this request if the corresponding capability exceptionBreakpointFilters returns one or more filters.

1interface SetExceptionBreakpointsRequest extends Request {
2  command: 'setExceptionBreakpoints';
3
4  arguments: SetExceptionBreakpointsArguments;
5}

Arguments for setExceptionBreakpoints request.

1interface SetExceptionBreakpointsArguments {
2  /**
3   * Set of exception filters specified by their ID. The set of all possible
4   * exception filters is defined by the `exceptionBreakpointFilters`
5   * capability. The `filter` and `filterOptions` sets are additive.
6   */
7  filters: string[];
8
9  /**
10   * Set of exception filters and their options. The set of all possible
11   * exception filters is defined by the `exceptionBreakpointFilters`
12   * capability. This attribute is only honored by a debug adapter if the
13   * corresponding capability `supportsExceptionFilterOptions` is true. The
14   * `filter` and `filterOptions` sets are additive.
15   */
16  filterOptions?: ExceptionFilterOptions[];
17
18  /**
19   * Configuration options for selected exceptions.
20   * The attribute is only honored by a debug adapter if the corresponding
21   * capability `supportsExceptionOptions` is true.
22   */
23  exceptionOptions?: ExceptionOptions[];
24}

Response to setExceptionBreakpoints request.

The response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the filters, filterOptions, exceptionOptions arrays given as arguments. If both filters and filterOptions are given, the returned array must start with filters information first, followed by filterOptions information.

The verified property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the message property explains the problem. The id property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.

For backward compatibility both the breakpoints array and the enclosing body are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.

1interface SetExceptionBreakpointsResponse extends Response {
2  body?: {
3    /**
4     * Information about the exception breakpoints or filters.
5     * The breakpoints returned are in the same order as the elements of the
6     * `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments.
7     * If both `filters` and `filterOptions` are given, the returned array must
8     * start with `filters` information first, followed by `filterOptions`
9     * information.
10     */
11    breakpoints?: Breakpoint[];
12  };
13}

#:leftwards_arrow_with_hook: DataBreakpointInfo Request

Obtains information on a possible data breakpoint that could be set on an expression or variable.

Clients should only call this request if the corresponding capability supportsDataBreakpoints is true.

1interface DataBreakpointInfoRequest extends Request {
2  command: 'dataBreakpointInfo';
3
4  arguments: DataBreakpointInfoArguments;
5}

Arguments for dataBreakpointInfo request.

1interface DataBreakpointInfoArguments {
2  /**
3   * Reference to the variable container if the data breakpoint is requested for
4   * a child of the container. The `variablesReference` must have been obtained
5   * in the current suspended state. See 'Lifetime of Object References' in the
6   * Overview section for details.
7   */
8  variablesReference?: number;
9
10  /**
11   * The name of the variable's child to obtain data breakpoint information for.
12   * If `variablesReference` isn't specified, this can be an expression, or an
13   * address if `asAddress` is also true.
14   */
15  name: string;
16
17  /**
18   * When `name` is an expression, evaluate it in the scope of this stack frame.
19   * If not specified, the expression is evaluated in the global scope. When
20   * `variablesReference` is specified, this property has no effect.
21   */
22  frameId?: number;
23
24  /**
25   * If specified, a debug adapter should return information for the range of
26   * memory extending `bytes` number of bytes from the address or variable
27   * specified by `name`. Breakpoints set using the resulting data ID should
28   * pause on data access anywhere within that range.
29   * 
30   * Clients may set this property only if the `supportsDataBreakpointBytes`
31   * capability is true.
32   */
33  bytes?: number;
34
35  /**
36   * If `true`, the `name` is a memory address and the debugger should interpret
37   * it as a decimal value, or hex value if it is prefixed with `0x`.
38   * 
39   * Clients may set this property only if the `supportsDataBreakpointBytes`
40   * capability is true.
41   */
42  asAddress?: boolean;
43
44  /**
45   * The mode of the desired breakpoint. If defined, this must be one of the
46   * `breakpointModes` the debug adapter advertised in its `Capabilities`.
47   */
48  mode?: string;
49}

Response to dataBreakpointInfo request.

1interface DataBreakpointInfoResponse extends Response {
2  body: {
3    /**
4     * An identifier for the data on which a data breakpoint can be registered
5     * with the `setDataBreakpoints` request or null if no data breakpoint is
6     * available. If a `variablesReference` or `frameId` is passed, the `dataId`
7     * is valid in the current suspended state, otherwise it's valid
8     * indefinitely. See 'Lifetime of Object References' in the Overview section
9     * for details. Breakpoints set using the `dataId` in the
10     * `setDataBreakpoints` request may outlive the lifetime of the associated
11     * `dataId`.
12     */
13    dataId: string | null;
14
15    /**
16     * UI string that describes on what data the breakpoint is set on or why a
17     * data breakpoint is not available.
18     */
19    description: string;
20
21    /**
22     * Attribute lists the available access types for a potential data
23     * breakpoint. A UI client could surface this information.
24     */
25    accessTypes?: DataBreakpointAccessType[];
26
27    /**
28     * Attribute indicates that a potential data breakpoint could be persisted
29     * across sessions.
30     */
31    canPersist?: boolean;
32  };
33}

#:leftwards_arrow_with_hook: SetDataBreakpoints Request

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 corresponding capability supportsDataBreakpoints is true.

1interface SetDataBreakpointsRequest extends Request {
2  command: 'setDataBreakpoints';
3
4  arguments: SetDataBreakpointsArguments;
5}

Arguments for setDataBreakpoints request.

1interface SetDataBreakpointsArguments {
2  /**
3   * The contents of this array replaces all existing data breakpoints. An empty
4   * array clears all data breakpoints.
5   */
6  breakpoints: DataBreakpoint[];
7}

Response to setDataBreakpoints request.

Returned is information about each breakpoint created by this request.

1interface SetDataBreakpointsResponse extends Response {
2  body: {
3    /**
4     * Information about the data breakpoints. The array elements correspond to
5     * the elements of the input argument `breakpoints` array.
6     */
7    breakpoints: Breakpoint[];
8  };
9}

#:leftwards_arrow_with_hook: SetInstructionBreakpoints Request

Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window.

To clear all instruction breakpoints, specify an empty array.

When an instruction breakpoint is hit, a stopped event (with reason instruction breakpoint) is generated.

Clients should only call this request if the corresponding capability supportsInstructionBreakpoints is true.

1interface SetInstructionBreakpointsRequest extends Request {
2  command: 'setInstructionBreakpoints';
3
4  arguments: SetInstructionBreakpointsArguments;
5}

Arguments for setInstructionBreakpoints request

1interface SetInstructionBreakpointsArguments {
2  /**
3   * The instruction references of the breakpoints
4   */
5  breakpoints: InstructionBreakpoint[];
6}

Response to setInstructionBreakpoints request

1interface SetInstructionBreakpointsResponse extends Response {
2  body: {
3    /**
4     * Information about the breakpoints. The array elements correspond to the
5     * elements of the `breakpoints` array.
6     */
7    breakpoints: Breakpoint[];
8  };
9}

#:leftwards_arrow_with_hook: Continue Request

The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true resumes only the specified thread. If not all threads were resumed, the allThreadsContinued attribute of the response should be set to false.

1interface ContinueRequest extends Request {
2  command: 'continue';
3
4  arguments: ContinueArguments;
5}

Arguments for continue request.

1interface ContinueArguments {
2  /**
3   * Specifies the active thread. If the debug adapter supports single thread
4   * execution (see `supportsSingleThreadExecutionRequests`) and the argument
5   * `singleThread` is true, only the thread with this ID is resumed.
6   */
7  threadId: number;
8
9  /**
10   * If this flag is true, execution is resumed only for the thread with given
11   * `threadId`.
12   */
13  singleThread?: boolean;
14}

Response to continue request.

1interface ContinueResponse extends Response {
2  body: {
3    /**
4     * If omitted or set to `true`, this response signals to the client that all
5     * threads have been resumed. The value `false` indicates that not all
6     * threads were resumed.
7     */
8    allThreadsContinued?: boolean;
9  };
10}

#:leftwards_arrow_with_hook: Next Request

The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.

If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true prevents other suspended threads from resuming.

The debug adapter first sends the response and then a stopped event (with reason step) after the step has completed.

1interface NextRequest extends Request {
2  command: 'next';
3
4  arguments: NextArguments;
5}

Arguments for next request.

1interface NextArguments {
2  /**
3   * Specifies the thread for which to resume execution for one step (of the
4   * given granularity).
5   */
6  threadId: number;
7
8  /**
9   * If this flag is true, all other suspended threads are not resumed.
10   */
11  singleThread?: boolean;
12
13  /**
14   * Stepping granularity. If no granularity is specified, a granularity of
15   * `statement` is assumed.
16   */
17  granularity?: SteppingGranularity;
18}

Response to next request. This is just an acknowledgement, so no body field is required.

1interface NextResponse extends Response {
2}

#:leftwards_arrow_with_hook: StepIn Request

The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.

If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true prevents other suspended threads from resuming.

If the request cannot step into a target, stepIn behaves like the next request.

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 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.

1interface StepInRequest extends Request {
2  command: 'stepIn';
3
4  arguments: StepInArguments;
5}

Arguments for stepIn request.

1interface StepInArguments {
2  /**
3   * Specifies the thread for which to resume execution for one step-into (of
4   * the given granularity).
5   */
6  threadId: number;
7
8  /**
9   * If this flag is true, all other suspended threads are not resumed.
10   */
11  singleThread?: boolean;
12
13  /**
14   * Id of the target to step into.
15   */
16  targetId?: number;
17
18  /**
19   * Stepping granularity. If no granularity is specified, a granularity of
20   * `statement` is assumed.
21   */
22  granularity?: SteppingGranularity;
23}

Response to stepIn request. This is just an acknowledgement, so no body field is required.

1interface StepInResponse extends Response {
2}

#:leftwards_arrow_with_hook: StepOut Request

The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.

If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true prevents other suspended threads from resuming.

The debug adapter first sends the response and then a stopped event (with reason step) after the step has completed.

1interface StepOutRequest extends Request {
2  command: 'stepOut';
3
4  arguments: StepOutArguments;
5}

Arguments for stepOut request.

1interface StepOutArguments {
2  /**
3   * Specifies the thread for which to resume execution for one step-out (of the
4   * given granularity).
5   */
6  threadId: number;
7
8  /**
9   * If this flag is true, all other suspended threads are not resumed.
10   */
11  singleThread?: boolean;
12
13  /**
14   * Stepping granularity. If no granularity is specified, a granularity of
15   * `statement` is assumed.
16   */
17  granularity?: SteppingGranularity;
18}

Response to stepOut request. This is just an acknowledgement, so no body field is required.

1interface StepOutResponse extends Response {
2}

#:leftwards_arrow_with_hook: StepBack Request

The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.

If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true prevents other suspended threads from resuming.

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 corresponding capability supportsStepBack is true.

1interface StepBackRequest extends Request {
2  command: 'stepBack';
3
4  arguments: StepBackArguments;
5}

Arguments for stepBack request.

1interface StepBackArguments {
2  /**
3   * Specifies the thread for which to resume execution for one step backwards
4   * (of the given granularity).
5   */
6  threadId: number;
7
8  /**
9   * If this flag is true, all other suspended threads are not resumed.
10   */
11  singleThread?: boolean;
12
13  /**
14   * Stepping granularity to step. If no granularity is specified, a granularity
15   * of `statement` is assumed.
16   */
17  granularity?: SteppingGranularity;
18}

Response to stepBack request. This is just an acknowledgement, so no body field is required.

1interface StepBackResponse extends Response {
2}

#:leftwards_arrow_with_hook: ReverseContinue Request

The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability supportsSingleThreadExecutionRequests), setting the singleThread argument to true resumes only the specified thread. If not all threads were resumed, the allThreadsContinued attribute of the response should be set to false.

Clients should only call this request if the corresponding capability supportsStepBack is true.

1interface ReverseContinueRequest extends Request {
2  command: 'reverseContinue';
3
4  arguments: ReverseContinueArguments;
5}

Arguments for reverseContinue request.

1interface ReverseContinueArguments {
2  /**
3   * Specifies the active thread. If the debug adapter supports single thread
4   * execution (see `supportsSingleThreadExecutionRequests`) and the
5   * `singleThread` argument is true, only the thread with this ID is resumed.
6   */
7  threadId: number;
8
9  /**
10   * If this flag is true, backward execution is resumed only for the thread
11   * with given `threadId`.
12   */
13  singleThread?: boolean;
14}

Response to reverseContinue request. This is just an acknowledgement, so no body field is required.

1interface ReverseContinueResponse extends Response {
2}

#:leftwards_arrow_with_hook: RestartFrame Request

The request restarts execution of the specified stack frame.

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 corresponding capability supportsRestartFrame is true.

1interface RestartFrameRequest extends Request {
2  command: 'restartFrame';
3
4  arguments: RestartFrameArguments;
5}

Arguments for restartFrame request.

1interface RestartFrameArguments {
2  /**
3   * Restart the stack frame identified by `frameId`. The `frameId` must have
4   * been obtained in the current suspended state. See 'Lifetime of Object
5   * References' in the Overview section for details.
6   */
7  frameId: number;
8}

Response to restartFrame request. This is just an acknowledgement, so no body field is required.

1interface RestartFrameResponse extends Response {
2}

#:leftwards_arrow_with_hook: Goto Request

The request sets the location where the debuggee will continue to run.

This makes it possible to skip the execution of code or to execute 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 corresponding capability supportsGotoTargetsRequest is true (because only then goto targets exist that can be passed as arguments).

1interface GotoRequest extends Request {
2  command: 'goto';
3
4  arguments: GotoArguments;
5}

Arguments for goto request.

1interface GotoArguments {
2  /**
3   * Set the goto target for this thread.
4   */
5  threadId: number;
6
7  /**
8   * The location where the debuggee will continue to run.
9   */
10  targetId: number;
11}

Response to goto request. This is just an acknowledgement, so no body field is required.

1interface GotoResponse extends Response {
2}

#:leftwards_arrow_with_hook: Pause Request

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.

1interface PauseRequest extends Request {
2  command: 'pause';
3
4  arguments: PauseArguments;
5}

Arguments for pause request.

1interface PauseArguments {
2  /**
3   * Pause execution for this thread.
4   */
5  threadId: number;
6}

Response to pause request. This is just an acknowledgement, so no body field is required.

1interface PauseResponse extends Response {
2}

#:leftwards_arrow_with_hook: StackTrace Request

The request returns a stacktrace from the current execution state of a given thread.

A client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability supportsDelayedStackTraceLoading is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.

1interface StackTraceRequest extends Request {
2  command: 'stackTrace';
3
4  arguments: StackTraceArguments;
5}

Arguments for stackTrace request.

1interface StackTraceArguments {
2  /**
3   * Retrieve the stacktrace for this thread.
4   */
5  threadId: number;
6
7  /**
8   * The index of the first frame to return; if omitted frames start at 0.
9   */
10  startFrame?: number;
11
12  /**
13   * The maximum number of frames to return. If levels is not specified or 0,
14   * all frames are returned.
15   */
16  levels?: number;
17
18  /**
19   * Specifies details on how to format the returned `StackFrame.name`. The
20   * debug adapter may format requested details in any way that would make sense
21   * to a developer.
22   * The attribute is only honored by a debug adapter if the corresponding
23   * capability `supportsValueFormattingOptions` is true.
24   */
25  format?: StackFrameFormat;
26}

Response to stackTrace request.

1interface StackTraceResponse extends Response {
2  body: {
3    /**
4     * The frames of the stack frame. If the array has length zero, there are no
5     * stack frames available.
6     * This means that there is no location information available.
7     */
8    stackFrames: StackFrame[];
9
10    /**
11     * The total number of frames available in the stack. If omitted or if
12     * `totalFrames` is larger than the available frames, a client is expected
13     * to request frames until a request returns less frames than requested
14     * (which indicates the end of the stack). Returning monotonically
15     * increasing `totalFrames` values for subsequent requests can be used to
16     * enforce paging in the client.
17     */
18    totalFrames?: number;
19  };
20}

#:leftwards_arrow_with_hook: Scopes Request

The request returns the variable scopes for a given stack frame ID.

1interface ScopesRequest extends Request {
2  command: 'scopes';
3
4  arguments: ScopesArguments;
5}

Arguments for scopes request.

1interface ScopesArguments {
2  /**
3   * Retrieve the scopes for the stack frame identified by `frameId`. The
4   * `frameId` must have been obtained in the current suspended state. See
5   * 'Lifetime of Object References' in the Overview section for details.
6   */
7  frameId: number;
8}

Response to scopes request.

1interface ScopesResponse extends Response {
2  body: {
3    /**
4     * The scopes of the stack frame. If the array has length zero, there are no
5     * scopes available.
6     */
7    scopes: Scope[];
8  };
9}

#:leftwards_arrow_with_hook: Variables Request

Retrieves all child variables for the given variable reference.

A filter can be used to limit the fetched children to either named or indexed children.

1interface VariablesRequest extends Request {
2  command: 'variables';
3
4  arguments: VariablesArguments;
5}

Arguments for variables request.

1interface VariablesArguments {
2  /**
3   * The variable for which to retrieve its children. The `variablesReference`
4   * must have been obtained in the current suspended state. See 'Lifetime of
5   * Object References' in the Overview section for details.
6   */
7  variablesReference: number;
8
9  /**
10   * Filter to limit the child variables to either named or indexed. If omitted,
11   * both types are fetched.
12   * Values: 'indexed', 'named'
13   */
14  filter?: 'indexed' | 'named';
15
16  /**
17   * The index of the first variable to return; if omitted children start at 0.
18   * The attribute is only honored by a debug adapter if the corresponding
19   * capability `supportsVariablePaging` is true.
20   */
21  start?: number;
22
23  /**
24   * The number of variables to return. If count is missing or 0, all variables
25   * are returned.
26   * The attribute is only honored by a debug adapter if the corresponding
27   * capability `supportsVariablePaging` is true.
28   */
29  count?: number;
30
31  /**
32   * Specifies details on how to format the Variable values.
33   * The attribute is only honored by a debug adapter if the corresponding
34   * capability `supportsValueFormattingOptions` is true.
35   */
36  format?: ValueFormat;
37}

Response to variables request.

1interface VariablesResponse extends Response {
2  body: {
3    /**
4     * All (or a range) of variables for the given variable reference.
5     */
6    variables: Variable[];
7  };
8}

#:leftwards_arrow_with_hook: SetVariable Request

Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability supportsSetVariable is true.

If a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.

1interface SetVariableRequest extends Request {
2  command: 'setVariable';
3
4  arguments: SetVariableArguments;
5}

Arguments for setVariable request.

1interface SetVariableArguments {
2  /**
3   * The reference of the variable container. The `variablesReference` must have
4   * been obtained in the current suspended state. See 'Lifetime of Object
5   * References' in the Overview section for details.
6   */
7  variablesReference: number;
8
9  /**
10   * The name of the variable in the container.
11   */
12  name: string;
13
14  /**
15   * The value of the variable.
16   */
17  value: string;
18
19  /**
20   * Specifies details on how to format the response value.
21   */
22  format?: ValueFormat;
23}

Response to setVariable request.

1interface SetVariableResponse extends Response {
2  body: {
3    /**
4     * The new value of the variable.
5     */
6    value: string;
7
8    /**
9     * The type of the new value. Typically shown in the UI when hovering over
10     * the value.
11     */
12    type?: string;
13
14    /**
15     * If `variablesReference` is > 0, the new value is structured and its
16     * children can be retrieved by passing `variablesReference` to the
17     * `variables` request as long as execution remains suspended. See 'Lifetime
18     * of Object References' in the Overview section for details.
19     * 
20     * If this property is included in the response, any `variablesReference`
21     * previously associated with the updated variable, and those of its
22     * children, are no longer valid.
23     */
24    variablesReference?: number;
25
26    /**
27     * The number of named child variables.
28     * The client can use this information to present the variables in a paged
29     * UI and fetch them in chunks.
30     * The value should be less than or equal to 2147483647 (2^31-1).
31     */
32    namedVariables?: number;
33
34    /**
35     * The number of indexed child variables.
36     * The client can use this information to present the variables in a paged
37     * UI and fetch them in chunks.
38     * The value should be less than or equal to 2147483647 (2^31-1).
39     */
40    indexedVariables?: number;
41
42    /**
43     * A memory reference to a location appropriate for this result.
44     * For pointer type eval results, this is generally a reference to the
45     * memory address contained in the pointer.
46     * This attribute may be returned by a debug adapter if corresponding
47     * capability `supportsMemoryReferences` is true.
48     */
49    memoryReference?: string;
50
51    /**
52     * A reference that allows the client to request the location where the new
53     * value is declared. For example, if the new value is function pointer, the
54     * adapter may be able to look up the function's location. This should be
55     * present only if the adapter is likely to be able to resolve the location.
56     * 
57     * This reference shares the same lifetime as the `variablesReference`. See
58     * 'Lifetime of Object References' in the Overview section for details.
59     */
60    valueLocationReference?: number;
61  };
62}

#:leftwards_arrow_with_hook: Source Request

The request retrieves the source code for a given source reference.

1interface SourceRequest extends Request {
2  command: 'source';
3
4  arguments: SourceArguments;
5}

Arguments for source request.

1interface SourceArguments {
2  /**
3   * Specifies the source content to load. Either `source.path` or
4   * `source.sourceReference` must be specified.
5   */
6  source?: Source;
7
8  /**
9   * The reference to the source. This is the same as `source.sourceReference`.
10   * This is provided for backward compatibility since old clients do not
11   * understand the `source` attribute.
12   */
13  sourceReference: number;
14}

Response to source request.

1interface SourceResponse extends Response {
2  body: {
3    /**
4     * Content of the source reference.
5     */
6    content: string;
7
8    /**
9     * Content type (MIME type) of the source.
10     */
11    mimeType?: string;
12  };
13}

#:leftwards_arrow_with_hook: Threads Request

The request retrieves a list of all threads.

1interface ThreadsRequest extends Request {
2  command: 'threads';
3}

Response to threads request.

1interface ThreadsResponse extends Response {
2  body: {
3    /**
4     * All threads.
5     */
6    threads: Thread[];
7  };
8}

#:leftwards_arrow_with_hook: TerminateThreads Request

The request terminates the threads with the given ids.

Clients should only call this request if the corresponding capability supportsTerminateThreadsRequest is true.

1interface TerminateThreadsRequest extends Request {
2  command: 'terminateThreads';
3
4  arguments: TerminateThreadsArguments;
5}

Arguments for terminateThreads request.

1interface TerminateThreadsArguments {
2  /**
3   * Ids of threads to be terminated.
4   */
5  threadIds?: number[];
6}

Response to terminateThreads request. This is just an acknowledgement, no body field is required.

1interface TerminateThreadsResponse extends Response {
2}

#:leftwards_arrow_with_hook: Modules Request

Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.

Clients should only call this request if the corresponding capability supportsModulesRequest is true.

1interface ModulesRequest extends Request {
2  command: 'modules';
3
4  arguments: ModulesArguments;
5}

Arguments for modules request.

1interface ModulesArguments {
2  /**
3   * The index of the first module to return; if omitted modules start at 0.
4   */
5  startModule?: number;
6
7  /**
8   * The number of modules to return. If `moduleCount` is not specified or 0,
9   * all modules are returned.
10   */
11  moduleCount?: number;
12}

Response to modules request.

1interface ModulesResponse extends Response {
2  body: {
3    /**
4     * All modules or range of modules.
5     */
6    modules: Module[];
7
8    /**
9     * The total number of modules available.
10     */
11    totalModules?: number;
12  };
13}

#:leftwards_arrow_with_hook: LoadedSources Request

Retrieves the set of all sources currently loaded by the debugged process.

Clients should only call this request if the corresponding capability supportsLoadedSourcesRequest is true.

1interface LoadedSourcesRequest extends Request {
2  command: 'loadedSources';
3
4  arguments?: LoadedSourcesArguments;
5}

Arguments for loadedSources request.

1interface LoadedSourcesArguments {
2}

Response to loadedSources request.

1interface LoadedSourcesResponse extends Response {
2  body: {
3    /**
4     * Set of loaded sources.
5     */
6    sources: Source[];
7  };
8}

#:leftwards_arrow_with_hook: Evaluate Request

Evaluates the given expression in the context of a stack frame.

The expression has access to any variables and arguments that are in scope.

1interface EvaluateRequest extends Request {
2  command: 'evaluate';
3
4  arguments: EvaluateArguments;
5}

Arguments for evaluate request.

1interface EvaluateArguments {
2  /**
3   * The expression to evaluate.
4   */
5  expression: string;
6
7  /**
8   * Evaluate the expression in the scope of this stack frame. If not specified,
9   * the expression is evaluated in the global scope.
10   */
11  frameId?: number;
12
13  /**
14   * The contextual line where the expression should be evaluated. In the
15   * 'hover' context, this should be set to the start of the expression being
16   * hovered.
17   */
18  line?: number;
19
20  /**
21   * The contextual column where the expression should be evaluated. This may be
22   * provided if `line` is also provided.
23   * 
24   * It is measured in UTF-16 code units and the client capability
25   * `columnsStartAt1` determines whether it is 0- or 1-based.
26   */
27  column?: number;
28
29  /**
30   * The contextual source in which the `line` is found. This must be provided
31   * if `line` is provided.
32   */
33  source?: Source;
34
35  /**
36   * The context in which the evaluate request is used.
37   * Values:
38   * 'watch': evaluate is called from a watch view context.
39   * 'repl': evaluate is called from a REPL context.
40   * 'hover': evaluate is called to generate the debug hover contents.
41   * This value should only be used if the corresponding capability
42   * `supportsEvaluateForHovers` is true.
43   * 'clipboard': evaluate is called to generate clipboard contents.
44   * This value should only be used if the corresponding capability
45   * `supportsClipboardContext` is true.
46   * 'variables': evaluate is called from a variables view context.
47   * etc.
48   */
49  context?: 'watch' | 'repl' | 'hover' | 'clipboard' | 'variables' | string;
50
51  /**
52   * Specifies details on how to format the result.
53   * The attribute is only honored by a debug adapter if the corresponding
54   * capability `supportsValueFormattingOptions` is true.
55   */
56  format?: ValueFormat;
57}

Response to evaluate request.

1interface EvaluateResponse extends Response {
2  body: {
3    /**
4     * The result of the evaluate request.
5     */
6    result: string;
7
8    /**
9     * The type of the evaluate result.
10     * This attribute should only be returned by a debug adapter if the
11     * corresponding capability `supportsVariableType` is true.
12     */
13    type?: string;
14
15    /**
16     * Properties of an evaluate result that can be used to determine how to
17     * render the result in the UI.
18     */
19    presentationHint?: VariablePresentationHint;
20
21    /**
22     * If `variablesReference` is > 0, the evaluate result is structured and its
23     * children can be retrieved by passing `variablesReference` to the
24     * `variables` request as long as execution remains suspended. See 'Lifetime
25     * of Object References' in the Overview section for details.
26     */
27    variablesReference: number;
28
29    /**
30     * The number of named child variables.
31     * The client can use this information to present the variables in a paged
32     * UI and fetch them in chunks.
33     * The value should be less than or equal to 2147483647 (2^31-1).
34     */
35    namedVariables?: number;
36
37    /**
38     * The number of indexed child variables.
39     * The client can use this information to present the variables in a paged
40     * UI and fetch them in chunks.
41     * The value should be less than or equal to 2147483647 (2^31-1).
42     */
43    indexedVariables?: number;
44
45    /**
46     * A memory reference to a location appropriate for this result.
47     * For pointer type eval results, this is generally a reference to the
48     * memory address contained in the pointer.
49     * This attribute may be returned by a debug adapter if corresponding
50     * capability `supportsMemoryReferences` is true.
51     */
52    memoryReference?: string;
53
54    /**
55     * A reference that allows the client to request the location where the
56     * returned value is declared. For example, if a function pointer is
57     * returned, the adapter may be able to look up the function's location.
58     * This should be present only if the adapter is likely to be able to
59     * resolve the location.
60     * 
61     * This reference shares the same lifetime as the `variablesReference`. See
62     * 'Lifetime of Object References' in the Overview section for details.
63     */
64    valueLocationReference?: number;
65  };
66}

#:leftwards_arrow_with_hook: SetExpression Request

Evaluates the given value expression and assigns it to the expression which must be a modifiable l-value.

The expressions have access to any variables and arguments that are in scope of the specified frame.

Clients should only call this request if the corresponding capability supportsSetExpression is true.

If a debug adapter implements both setExpression and setVariable, a client uses setExpression if the variable has an evaluateName property.

1interface SetExpressionRequest extends Request {
2  command: 'setExpression';
3
4  arguments: SetExpressionArguments;
5}

Arguments for setExpression request.

1interface SetExpressionArguments {
2  /**
3   * The l-value expression to assign to.
4   */
5  expression: string;
6
7  /**
8   * The value expression to assign to the l-value expression.
9   */
10  value: string;
11
12  /**
13   * Evaluate the expressions in the scope of this stack frame. If not
14   * specified, the expressions are evaluated in the global scope.
15   */
16  frameId?: number;
17
18  /**
19   * Specifies how the resulting value should be formatted.
20   */
21  format?: ValueFormat;
22}

Response to setExpression request.

1interface SetExpressionResponse extends Response {
2  body: {
3    /**
4     * The new value of the expression.
5     */
6    value: string;
7
8    /**
9     * The type of the value.
10     * This attribute should only be returned by a debug adapter if the
11     * corresponding capability `supportsVariableType` is true.
12     */
13    type?: string;
14
15    /**
16     * Properties of a value that can be used to determine how to render the
17     * result in the UI.
18     */
19    presentationHint?: VariablePresentationHint;
20
21    /**
22     * If `variablesReference` is > 0, the evaluate result is structured and its
23     * children can be retrieved by passing `variablesReference` to the
24     * `variables` request as long as execution remains suspended. See 'Lifetime
25     * of Object References' in the Overview section for details.
26     */
27    variablesReference?: number;
28
29    /**
30     * The number of named child variables.
31     * The client can use this information to present the variables in a paged
32     * UI and fetch them in chunks.
33     * The value should be less than or equal to 2147483647 (2^31-1).
34     */
35    namedVariables?: number;
36
37    /**
38     * The number of indexed child variables.
39     * The client can use this information to present the variables in a paged
40     * UI and fetch them in chunks.
41     * The value should be less than or equal to 2147483647 (2^31-1).
42     */
43    indexedVariables?: number;
44
45    /**
46     * A memory reference to a location appropriate for this result.
47     * For pointer type eval results, this is generally a reference to the
48     * memory address contained in the pointer.
49     * This attribute may be returned by a debug adapter if corresponding
50     * capability `supportsMemoryReferences` is true.
51     */
52    memoryReference?: string;
53
54    /**
55     * A reference that allows the client to request the location where the new
56     * value is declared. For example, if the new value is function pointer, the
57     * adapter may be able to look up the function's location. This should be
58     * present only if the adapter is likely to be able to resolve the location.
59     * 
60     * This reference shares the same lifetime as the `variablesReference`. See
61     * 'Lifetime of Object References' in the Overview section for details.
62     */
63    valueLocationReference?: number;
64  };
65}

#:leftwards_arrow_with_hook: StepInTargets Request

This request retrieves the possible step-in targets for the specified stack frame.

These targets can be used in the stepIn request.

Clients should only call this request if the corresponding capability supportsStepInTargetsRequest is true.

1interface StepInTargetsRequest extends Request {
2  command: 'stepInTargets';
3
4  arguments: StepInTargetsArguments;
5}

Arguments for stepInTargets request.

1interface StepInTargetsArguments {
2  /**
3   * The stack frame for which to retrieve the possible step-in targets.
4   */
5  frameId: number;
6}

Response to stepInTargets request.

1interface StepInTargetsResponse extends Response {
2  body: {
3    /**
4     * The possible step-in targets of the specified source location.
5     */
6    targets: StepInTarget[];
7  };
8}

#:leftwards_arrow_with_hook: GotoTargets Request

This request retrieves the possible goto targets for the specified source location.

These targets can be used in the goto request.

Clients should only call this request if the corresponding capability supportsGotoTargetsRequest is true.

1interface GotoTargetsRequest extends Request {
2  command: 'gotoTargets';
3
4  arguments: GotoTargetsArguments;
5}

Arguments for gotoTargets request.

1interface GotoTargetsArguments {
2  /**
3   * The source location for which the goto targets are determined.
4   */
5  source: Source;
6
7  /**
8   * The line location for which the goto targets are determined.
9   */
10  line: number;
11
12  /**
13   * The position within `line` for which the goto targets are determined. It is
14   * measured in UTF-16 code units and the client capability `columnsStartAt1`
15   * determines whether it is 0- or 1-based.
16   */
17  column?: number;
18}

Response to gotoTargets request.

1interface GotoTargetsResponse extends Response {
2  body: {
3    /**
4     * The possible goto targets of the specified location.
5     */
6    targets: GotoTarget[];
7  };
8}

#:leftwards_arrow_with_hook: Completions Request

Returns a list of possible completions for a given caret position and text.

Clients should only call this request if the corresponding capability supportsCompletionsRequest is true.

1interface CompletionsRequest extends Request {
2  command: 'completions';
3
4  arguments: CompletionsArguments;
5}

Arguments for completions request.

1interface CompletionsArguments {
2  /**
3   * Returns completions in the scope of this stack frame. If not specified, the
4   * completions are returned for the global scope.
5   */
6  frameId?: number;
7
8  /**
9   * One or more source lines. Typically this is the text users have typed into
10   * the debug console before they asked for completion.
11   */
12  text: string;
13
14  /**
15   * The position within `text` for which to determine the completion proposals.
16   * It is measured in UTF-16 code units and the client capability
17   * `columnsStartAt1` determines whether it is 0- or 1-based.
18   */
19  column: number;
20
21  /**
22   * A line for which to determine the completion proposals. If missing the
23   * first line of the text is assumed.
24   */
25  line?: number;
26}

Response to completions request.

1interface CompletionsResponse extends Response {
2  body: {
3    /**
4     * The possible completions for .
5     */
6    targets: CompletionItem[];
7  };
8}

#:leftwards_arrow_with_hook: ExceptionInfo Request

Retrieves the details of the exception that caused this event to be raised.

Clients should only call this request if the corresponding capability supportsExceptionInfoRequest is true.

1interface ExceptionInfoRequest extends Request {
2  command: 'exceptionInfo';
3
4  arguments: ExceptionInfoArguments;
5}

Arguments for exceptionInfo request.

1interface ExceptionInfoArguments {
2  /**
3   * Thread for which exception information should be retrieved.
4   */
5  threadId: number;
6}

Response to exceptionInfo request.

1interface ExceptionInfoResponse extends Response {
2  body: {
3    /**
4     * ID of the exception that was thrown.
5     */
6    exceptionId: string;
7
8    /**
9     * Descriptive text for the exception.
10     */
11    description?: string;
12
13    /**
14     * Mode that caused the exception notification to be raised.
15     */
16    breakMode: ExceptionBreakMode;
17
18    /**
19     * Detailed information about the exception.
20     */
21    details?: ExceptionDetails;
22  };
23}

#:leftwards_arrow_with_hook: ReadMemory Request

Reads bytes from memory at the provided location.

Clients should only call this request if the corresponding capability supportsReadMemoryRequest is true.

1interface ReadMemoryRequest extends Request {
2  command: 'readMemory';
3
4  arguments: ReadMemoryArguments;
5}

Arguments for readMemory request.

1interface ReadMemoryArguments {
2  /**
3   * Memory reference to the base location from which data should be read.
4   */
5  memoryReference: string;
6
7  /**
8   * Offset (in bytes) to be applied to the reference location before reading
9   * data. Can be negative.
10   */
11  offset?: number;
12
13  /**
14   * Number of bytes to read at the specified location and offset.
15   */
16  count: number;
17}

Response to readMemory request.

1interface ReadMemoryResponse extends Response {
2  body?: {
3    /**
4     * The address of the first byte of data returned.
5     * Treated as a hex value if prefixed with `0x`, or as a decimal value
6     * otherwise.
7     */
8    address: string;
9
10    /**
11     * The number of unreadable bytes encountered after the last successfully
12     * read byte.
13     * This can be used to determine the number of bytes that should be skipped
14     * before a subsequent `readMemory` request succeeds.
15     */
16    unreadableBytes?: number;
17
18    /**
19     * The bytes read from memory, encoded using base64. If the decoded length
20     * of `data` is less than the requested `count` in the original `readMemory`
21     * request, and `unreadableBytes` is zero or omitted, then the client should
22     * assume it's reached the end of readable memory.
23     */
24    data?: string;
25  };
26}

#:leftwards_arrow_with_hook: WriteMemory Request

Writes bytes to memory at the provided location.

Clients should only call this request if the corresponding capability supportsWriteMemoryRequest is true.

1interface WriteMemoryRequest extends Request {
2  command: 'writeMemory';
3
4  arguments: WriteMemoryArguments;
5}

Arguments for writeMemory request.

1interface WriteMemoryArguments {
2  /**
3   * Memory reference to the base location to which data should be written.
4   */
5  memoryReference: string;
6
7  /**
8   * Offset (in bytes) to be applied to the reference location before writing
9   * data. Can be negative.
10   */
11  offset?: number;
12
13  /**
14   * Property to control partial writes. If true, the debug adapter should
15   * attempt to write memory even if the entire memory region is not writable.
16   * In such a case the debug adapter should stop after hitting the first byte
17   * of memory that cannot be written and return the number of bytes written in
18   * the response via the `offset` and `bytesWritten` properties.
19   * If false or missing, a debug adapter should attempt to verify the region is
20   * writable before writing, and fail the response if it is not.
21   */
22  allowPartial?: boolean;
23
24  /**
25   * Bytes to write, encoded using base64.
26   */
27  data: string;
28}

Response to writeMemory request.

1interface WriteMemoryResponse extends Response {
2  body?: {
3    /**
4     * Property that should be returned when `allowPartial` is true to indicate
5     * the offset of the first byte of data successfully written. Can be
6     * negative.
7     */
8    offset?: number;
9
10    /**
11     * Property that should be returned when `allowPartial` is true to indicate
12     * the number of bytes starting from address that were successfully written.
13     */
14    bytesWritten?: number;
15  };
16}

#:leftwards_arrow_with_hook: Disassemble Request

Disassembles code stored at the provided location.

Clients should only call this request if the corresponding capability supportsDisassembleRequest is true.

1interface DisassembleRequest extends Request {
2  command: 'disassemble';
3
4  arguments: DisassembleArguments;
5}

Arguments for disassemble request.

1interface DisassembleArguments {
2  /**
3   * Memory reference to the base location containing the instructions to
4   * disassemble.
5   */
6  memoryReference: string;
7
8  /**
9   * Offset (in bytes) to be applied to the reference location before
10   * disassembling. Can be negative.
11   */
12  offset?: number;
13
14  /**
15   * Offset (in instructions) to be applied after the byte offset (if any)
16   * before disassembling. Can be negative.
17   */
18  instructionOffset?: number;
19
20  /**
21   * Number of instructions to disassemble starting at the specified location
22   * and offset.
23   * An adapter must return exactly this number of instructions - any
24   * unavailable instructions should be replaced with an implementation-defined
25   * 'invalid instruction' value.
26   */
27  instructionCount: number;
28
29  /**
30   * If true, the adapter should attempt to resolve memory addresses and other
31   * values to symbolic names.
32   */
33  resolveSymbols?: boolean;
34}

Response to disassemble request.

1interface DisassembleResponse extends Response {
2  body?: {
3    /**
4     * The list of disassembled instructions.
5     */
6    instructions: DisassembledInstruction[];
7  };
8}

#:leftwards_arrow_with_hook: Locations Request

Looks up information about a location reference previously returned by the debug adapter.

1interface LocationsRequest extends Request {
2  command: 'locations';
3
4  arguments: LocationsArguments;
5}

Arguments for locations request.

1interface LocationsArguments {
2  /**
3   * Location reference to resolve.
4   */
5  locationReference: number;
6}

Response to locations request.

1interface LocationsResponse extends Response {
2  body?: {
3    /**
4     * The source containing the location; either `source.path` or
5     * `source.sourceReference` must be specified.
6     */
7    source: Source;
8
9    /**
10     * The line number of the location. The client capability `linesStartAt1`
11     * determines whether it is 0- or 1-based.
12     */
13    line: number;
14
15    /**
16     * Position of the location within the `line`. It is measured in UTF-16 code
17     * units and the client capability `columnsStartAt1` determines whether it
18     * is 0- or 1-based. If no column is given, the first position in the start
19     * line is assumed.
20     */
21    column?: number;
22
23    /**
24     * End line of the location, present if the location refers to a range.  The
25     * client capability `linesStartAt1` determines whether it is 0- or 1-based.
26     */
27    endLine?: number;
28
29    /**
30     * End position of the location within `endLine`, present if the location
31     * refers to a range. It is measured in UTF-16 code units and the client
32     * capability `columnsStartAt1` determines whether it is 0- or 1-based.
33     */
34    endColumn?: number;
35  };
36}

#Types

#Capabilities

Information about the capabilities of a debug adapter.

1interface Capabilities {
2  /**
3   * The debug adapter supports the `configurationDone` request.
4   */
5  supportsConfigurationDoneRequest?: boolean;
6
7  /**
8   * The debug adapter supports function breakpoints.
9   */
10  supportsFunctionBreakpoints?: boolean;
11
12  /**
13   * The debug adapter supports conditional breakpoints.
14   */
15  supportsConditionalBreakpoints?: boolean;
16
17  /**
18   * The debug adapter supports breakpoints that break execution after a
19   * specified number of hits.
20   */
21  supportsHitConditionalBreakpoints?: boolean;
22
23  /**
24   * The debug adapter supports a (side effect free) `evaluate` request for data
25   * hovers.
26   */
27  supportsEvaluateForHovers?: boolean;
28
29  /**
30   * Available exception filter options for the `setExceptionBreakpoints`
31   * request.
32   */
33  exceptionBreakpointFilters?: ExceptionBreakpointsFilter[];
34
35  /**
36   * The debug adapter supports stepping back via the `stepBack` and
37   * `reverseContinue` requests.
38   */
39  supportsStepBack?: boolean;
40
41  /**
42   * The debug adapter supports setting a variable to a value.
43   */
44  supportsSetVariable?: boolean;
45
46  /**
47   * The debug adapter supports restarting a frame.
48   */
49  supportsRestartFrame?: boolean;
50
51  /**
52   * The debug adapter supports the `gotoTargets` request.
53   */
54  supportsGotoTargetsRequest?: boolean;
55
56  /**
57   * The debug adapter supports the `stepInTargets` request.
58   */
59  supportsStepInTargetsRequest?: boolean;
60
61  /**
62   * The debug adapter supports the `completions` request.
63   */
64  supportsCompletionsRequest?: boolean;
65
66  /**
67   * The set of characters that should trigger completion in a REPL. If not
68   * specified, the UI should assume the `.` character.
69   */
70  completionTriggerCharacters?: string[];
71
72  /**
73   * The debug adapter supports the `modules` request.
74   */
75  supportsModulesRequest?: boolean;
76
77  /**
78   * The set of additional module information exposed by the debug adapter.
79   */
80  additionalModuleColumns?: ColumnDescriptor[];
81
82  /**
83   * Checksum algorithms supported by the debug adapter.
84   */
85  supportedChecksumAlgorithms?: ChecksumAlgorithm[];
86
87  /**
88   * The debug adapter supports the `restart` request. In this case a client
89   * should not implement `restart` by terminating and relaunching the adapter
90   * but by calling the `restart` request.
91   */
92  supportsRestartRequest?: boolean;
93
94  /**
95   * The debug adapter supports `exceptionOptions` on the
96   * `setExceptionBreakpoints` request.
97   */
98  supportsExceptionOptions?: boolean;
99
100  /**
101   * The debug adapter supports a `format` attribute on the `stackTrace`,
102   * `variables`, and `evaluate` requests.
103   */
104  supportsValueFormattingOptions?: boolean;
105
106  /**
107   * The debug adapter supports the `exceptionInfo` request.
108   */
109  supportsExceptionInfoRequest?: boolean;
110
111  /**
112   * The debug adapter supports the `terminateDebuggee` attribute on the
113   * `disconnect` request.
114   */
115  supportTerminateDebuggee?: boolean;
116
117  /**
118   * The debug adapter supports the `suspendDebuggee` attribute on the
119   * `disconnect` request.
120   */
121  supportSuspendDebuggee?: boolean;
122
123  /**
124   * The debug adapter supports the delayed loading of parts of the stack, which
125   * requires that both the `startFrame` and `levels` arguments and the
126   * `totalFrames` result of the `stackTrace` request are supported.
127   */
128  supportsDelayedStackTraceLoading?: boolean;
129
130  /**
131   * The debug adapter supports the `loadedSources` request.
132   */
133  supportsLoadedSourcesRequest?: boolean;
134
135  /**
136   * The debug adapter supports log points by interpreting the `logMessage`
137   * attribute of the `SourceBreakpoint`.
138   */
139  supportsLogPoints?: boolean;
140
141  /**
142   * The debug adapter supports the `terminateThreads` request.
143   */
144  supportsTerminateThreadsRequest?: boolean;
145
146  /**
147   * The debug adapter supports the `setExpression` request.
148   */
149  supportsSetExpression?: boolean;
150
151  /**
152   * The debug adapter supports the `terminate` request.
153   */
154  supportsTerminateRequest?: boolean;
155
156  /**
157   * The debug adapter supports data breakpoints.
158   */
159  supportsDataBreakpoints?: boolean;
160
161  /**
162   * The debug adapter supports the `readMemory` request.
163   */
164  supportsReadMemoryRequest?: boolean;
165
166  /**
167   * The debug adapter supports the `writeMemory` request.
168   */
169  supportsWriteMemoryRequest?: boolean;
170
171  /**
172   * The debug adapter supports the `disassemble` request.
173   */
174  supportsDisassembleRequest?: boolean;
175
176  /**
177   * The debug adapter supports the `cancel` request.
178   */
179  supportsCancelRequest?: boolean;
180
181  /**
182   * The debug adapter supports the `breakpointLocations` request.
183   */
184  supportsBreakpointLocationsRequest?: boolean;
185
186  /**
187   * The debug adapter supports the `clipboard` context value in the `evaluate`
188   * request.
189   */
190  supportsClipboardContext?: boolean;
191
192  /**
193   * The debug adapter supports stepping granularities (argument `granularity`)
194   * for the stepping requests.
195   */
196  supportsSteppingGranularity?: boolean;
197
198  /**
199   * The debug adapter supports adding breakpoints based on instruction
200   * references.
201   */
202  supportsInstructionBreakpoints?: boolean;
203
204  /**
205   * The debug adapter supports `filterOptions` as an argument on the
206   * `setExceptionBreakpoints` request.
207   */
208  supportsExceptionFilterOptions?: boolean;
209
210  /**
211   * The debug adapter supports the `singleThread` property on the execution
212   * requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`,
213   * `stepBack`).
214   */
215  supportsSingleThreadExecutionRequests?: boolean;
216
217  /**
218   * The debug adapter supports the `asAddress` and `bytes` fields in the
219   * `dataBreakpointInfo` request.
220   */
221  supportsDataBreakpointBytes?: boolean;
222
223  /**
224   * Modes of breakpoints supported by the debug adapter, such as 'hardware' or
225   * 'software'. If present, the client may allow the user to select a mode and
226   * include it in its `setBreakpoints` request.
227   * 
228   * Clients may present the first applicable mode in this array as the
229   * 'default' mode in gestures that set breakpoints.
230   */
231  breakpointModes?: BreakpointMode[];
232
233  /**
234   * The debug adapter supports ANSI escape sequences in styling of
235   * `OutputEvent.output` and `Variable.value` fields.
236   */
237  supportsANSIStyling?: boolean;
238}

#ExceptionBreakpointsFilter

An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.

1interface ExceptionBreakpointsFilter {
2  /**
3   * The internal ID of the filter option. This value is passed to the
4   * `setExceptionBreakpoints` request.
5   */
6  filter: string;
7
8  /**
9   * The name of the filter option. This is shown in the UI.
10   */
11  label: string;
12
13  /**
14   * A help text providing additional information about the exception filter.
15   * This string is typically shown as a hover and can be translated.
16   */
17  description?: string;
18
19  /**
20   * Initial value of the filter option. If not specified a value false is
21   * assumed.
22   */
23  default?: boolean;
24
25  /**
26   * Controls whether a condition can be specified for this filter option. If
27   * false or missing, a condition can not be set.
28   */
29  supportsCondition?: boolean;
30
31  /**
32   * A help text providing information about the condition. This string is shown
33   * as the placeholder text for a text box and can be translated.
34   */
35  conditionDescription?: string;
36}

#Message

A structured message object. Used to return errors from requests.

1interface Message {
2  /**
3   * Unique (within a debug adapter implementation) identifier for the message.
4   * The purpose of these error IDs is to help extension authors that have the
5   * requirement that every user visible error message needs a corresponding
6   * error number, so that users or customer support can find information about
7   * the specific error more easily.
8   */
9  id: number;
10
11  /**
12   * A format string for the message. Embedded variables have the form `{name}`.
13   * If variable name starts with an underscore character, the variable does not
14   * contain user data (PII) and can be safely used for telemetry purposes.
15   */
16  format: string;
17
18  /**
19   * An object used as a dictionary for looking up the variables in the format
20   * string.
21   */
22  variables?: { [key: string]: string; };
23
24  /**
25   * If true send to telemetry.
26   */
27  sendTelemetry?: boolean;
28
29  /**
30   * If true show user.
31   */
32  showUser?: boolean;
33
34  /**
35   * A url where additional information about this message can be found.
36   */
37  url?: string;
38
39  /**
40   * A label that is presented to the user as the UI for opening the url.
41   */
42  urlLabel?: string;
43}

#Module

A Module object represents a row in the modules view.

The id attribute identifies a module in the modules view and is used in a module event for identifying a module for adding, updating or deleting.

The name attribute is used to minimally render the module in the UI.

Additional attributes can be added to the module. They show up in the module view if they have a corresponding ColumnDescriptor.

To avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.

1interface Module {
2  /**
3   * Unique identifier for the module.
4   */
5  id: number | string;
6
7  /**
8   * A name of the module.
9   */
10  name: string;
11
12  /**
13   * Logical full path to the module. The exact definition is implementation
14   * defined, but usually this would be a full path to the on-disk file for the
15   * module.
16   */
17  path?: string;
18
19  /**
20   * True if the module is optimized.
21   */
22  isOptimized?: boolean;
23
24  /**
25   * True if the module is considered 'user code' by a debugger that supports
26   * 'Just My Code'.
27   */
28  isUserCode?: boolean;
29
30  /**
31   * Version of Module.
32   */
33  version?: string;
34
35  /**
36   * User-understandable description of if symbols were found for the module
37   * (ex: 'Symbols Loaded', 'Symbols not found', etc.)
38   */
39  symbolStatus?: string;
40
41  /**
42   * Logical full path to the symbol file. The exact definition is
43   * implementation defined.
44   */
45  symbolFilePath?: string;
46
47  /**
48   * Module created or modified, encoded as a RFC 3339 timestamp.
49   */
50  dateTimeStamp?: string;
51
52  /**
53   * Address range covered by this module.
54   */
55  addressRange?: string;
56}

#ColumnDescriptor

A ColumnDescriptor specifies what module attribute to show in a column of the modules view, how to format it,

and what the column's label should be.

It is only used if the underlying UI actually supports this level of customization.

1interface ColumnDescriptor {
2  /**
3   * Name of the attribute rendered in this column.
4   */
5  attributeName: string;
6
7  /**
8   * Header UI label of column.
9   */
10  label: string;
11
12  /**
13   * Format to use for the rendered values in this column. TBD how the format
14   * strings looks like.
15   */
16  format?: string;
17
18  /**
19   * Datatype of values in this column. Defaults to `string` if not specified.
20   * Values: 'string', 'number', 'boolean', 'unixTimestampUTC'
21   */
22  type?: 'string' | 'number' | 'boolean' | 'unixTimestampUTC';
23
24  /**
25   * Width of this column in characters (hint only).
26   */
27  width?: number;
28}

#Thread

A Thread

1interface Thread {
2  /**
3   * Unique identifier for the thread.
4   */
5  id: number;
6
7  /**
8   * The name of the thread.
9   */
10  name: string;
11}

#Source

A Source is a descriptor for source code.

It is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.

1interface Source {
2  /**
3   * The short name of the source. Every source returned from the debug adapter
4   * has a name.
5   * When sending a source to the debug adapter this name is optional.
6   */
7  name?: string;
8
9  /**
10   * The path of the source to be shown in the UI.
11   * It is only used to locate and load the content of the source if no
12   * `sourceReference` is specified (or its value is 0).
13   */
14  path?: string;
15
16  /**
17   * If the value > 0 the contents of the source must be retrieved through the
18   * `source` request (even if a path is specified).
19   * Since a `sourceReference` is only valid for a session, it can not be used
20   * to persist a source.
21   * The value should be less than or equal to 2147483647 (2^31-1).
22   */
23  sourceReference?: number;
24
25  /**
26   * A hint for how to present the source in the UI.
27   * A value of `deemphasize` can be used to indicate that the source is not
28   * available or that it is skipped on stepping.
29   * Values: 'normal', 'emphasize', 'deemphasize'
30   */
31  presentationHint?: 'normal' | 'emphasize' | 'deemphasize';
32
33  /**
34   * The origin of this source. For example, 'internal module', 'inlined content
35   * from source map', etc.
36   */
37  origin?: string;
38
39  /**
40   * A list of sources that are related to this source. These may be the source
41   * that generated this source.
42   */
43  sources?: Source[];
44
45  /**
46   * Additional data that a debug adapter might want to loop through the client.
47   * The client should leave the data intact and persist it across sessions. The
48   * client should not interpret the data.
49   */
50  adapterData?: any;
51
52  /**
53   * The checksums associated with this file.
54   */
55  checksums?: Checksum[];
56}

#StackFrame

A Stackframe contains the source location.

1interface StackFrame {
2  /**
3   * An identifier for the stack frame. It must be unique across all threads.
4   * This id can be used to retrieve the scopes of the frame with the `scopes`
5   * request or to restart the execution of a stack frame.
6   */
7  id: number;
8
9  /**
10   * The name of the stack frame, typically a method name.
11   */
12  name: string;
13
14  /**
15   * The source of the frame.
16   */
17  source?: Source;
18
19  /**
20   * The line within the source of the frame. If the source attribute is missing
21   * or doesn't exist, `line` is 0 and should be ignored by the client.
22   */
23  line: number;
24
25  /**
26   * Start position of the range covered by the stack frame. It is measured in
27   * UTF-16 code units and the client capability `columnsStartAt1` determines
28   * whether it is 0- or 1-based. If attribute `source` is missing or doesn't
29   * exist, `column` is 0 and should be ignored by the client.
30   */
31  column: number;
32
33  /**
34   * The end line of the range covered by the stack frame.
35   */
36  endLine?: number;
37
38  /**
39   * End position of the range covered by the stack frame. It is measured in
40   * UTF-16 code units and the client capability `columnsStartAt1` determines
41   * whether it is 0- or 1-based.
42   */
43  endColumn?: number;
44
45  /**
46   * Indicates whether this frame can be restarted with the `restartFrame`
47   * request. Clients should only use this if the debug adapter supports the
48   * `restart` request and the corresponding capability `supportsRestartFrame`
49   * is true. If a debug adapter has this capability, then `canRestart` defaults
50   * to `true` if the property is absent.
51   */
52  canRestart?: boolean;
53
54  /**
55   * A memory reference for the current instruction pointer in this frame.
56   */
57  instructionPointerReference?: string;
58
59  /**
60   * The module associated with this frame, if any.
61   */
62  moduleId?: number | string;
63
64  /**
65   * A hint for how to present this frame in the UI.
66   * A value of `label` can be used to indicate that the frame is an artificial
67   * frame that is used as a visual label or separator. A value of `subtle` can
68   * be used to change the appearance of a frame in a 'subtle' way.
69   * Values: 'normal', 'label', 'subtle'
70   */
71  presentationHint?: 'normal' | 'label' | 'subtle';
72}

#Scope

A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.

1interface Scope {
2  /**
3   * Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This
4   * string is shown in the UI as is and can be translated.
5   */
6  name: string;
7
8  /**
9   * A hint for how to present this scope in the UI. If this attribute is
10   * missing, the scope is shown with a generic UI.
11   * Values:
12   * 'arguments': Scope contains method arguments.
13   * 'locals': Scope contains local variables.
14   * 'registers': Scope contains registers. Only a single `registers` scope
15   * should be returned from a `scopes` request.
16   * 'returnValue': Scope contains one or more return values.
17   * etc.
18   */
19  presentationHint?: 'arguments' | 'locals' | 'registers' | 'returnValue' | string;
20
21  /**
22   * The variables of this scope can be retrieved by passing the value of
23   * `variablesReference` to the `variables` request as long as execution
24   * remains suspended. See 'Lifetime of Object References' in the Overview
25   * section for details.
26   */
27  variablesReference: number;
28
29  /**
30   * The number of named variables in this scope.
31   * The client can use this information to present the variables in a paged UI
32   * and fetch them in chunks.
33   */
34  namedVariables?: number;
35
36  /**
37   * The number of indexed variables in this scope.
38   * The client can use this information to present the variables in a paged UI
39   * and fetch them in chunks.
40   */
41  indexedVariables?: number;
42
43  /**
44   * If true, the number of variables in this scope is large or expensive to
45   * retrieve.
46   */
47  expensive: boolean;
48
49  /**
50   * The source for this scope.
51   */
52  source?: Source;
53
54  /**
55   * The start line of the range covered by this scope.
56   */
57  line?: number;
58
59  /**
60   * Start position of the range covered by the scope. It is measured in UTF-16
61   * code units and the client capability `columnsStartAt1` determines whether
62   * it is 0- or 1-based.
63   */
64  column?: number;
65
66  /**
67   * The end line of the range covered by this scope.
68   */
69  endLine?: number;
70
71  /**
72   * End position of the range covered by the scope. It is measured in UTF-16
73   * code units and the client capability `columnsStartAt1` determines whether
74   * it is 0- or 1-based.
75   */
76  endColumn?: number;
77}

#Variable

A Variable is a name/value pair.

The type attribute is shown if space permits or when hovering over the variable's name.

The kind attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.

If the value is structured (has children), a handle is provided to retrieve the children with the variables request.

If the number of named or indexed children is large, the numbers should be returned via the namedVariables and indexedVariables attributes.

The client can use this information to present the children in a paged UI and fetch them in chunks.

1interface Variable {
2  /**
3   * The variable's name.
4   */
5  name: string;
6
7  /**
8   * The variable's value.
9   * This can be a multi-line text, e.g. for a function the body of a function.
10   * For structured variables (which do not have a simple value), it is
11   * recommended to provide a one-line representation of the structured object.
12   * This helps to identify the structured object in the collapsed state when
13   * its children are not yet visible.
14   * An empty string can be used if no value should be shown in the UI.
15   */
16  value: string;
17
18  /**
19   * The type of the variable's value. Typically shown in the UI when hovering
20   * over the value.
21   * This attribute should only be returned by a debug adapter if the
22   * corresponding capability `supportsVariableType` is true.
23   */
24  type?: string;
25
26  /**
27   * Properties of a variable that can be used to determine how to render the
28   * variable in the UI.
29   */
30  presentationHint?: VariablePresentationHint;
31
32  /**
33   * The evaluatable name of this variable which can be passed to the `evaluate`
34   * request to fetch the variable's value.
35   */
36  evaluateName?: string;
37
38  /**
39   * If `variablesReference` is > 0, the variable is structured and its children
40   * can be retrieved by passing `variablesReference` to the `variables` request
41   * as long as execution remains suspended. See 'Lifetime of Object References'
42   * in the Overview section for details.
43   */
44  variablesReference: number;
45
46  /**
47   * The number of named child variables.
48   * The client can use this information to present the children in a paged UI
49   * and fetch them in chunks.
50   */
51  namedVariables?: number;
52
53  /**
54   * The number of indexed child variables.
55   * The client can use this information to present the children in a paged UI
56   * and fetch them in chunks.
57   */
58  indexedVariables?: number;
59
60  /**
61   * A memory reference associated with this variable.
62   * For pointer type variables, this is generally a reference to the memory
63   * address contained in the pointer.
64   * For executable data, this reference may later be used in a `disassemble`
65   * request.
66   * This attribute may be returned by a debug adapter if corresponding
67   * capability `supportsMemoryReferences` is true.
68   */
69  memoryReference?: string;
70
71  /**
72   * A reference that allows the client to request the location where the
73   * variable is declared. This should be present only if the adapter is likely
74   * to be able to resolve the location.
75   * 
76   * This reference shares the same lifetime as the `variablesReference`. See
77   * 'Lifetime of Object References' in the Overview section for details.
78   */
79  declarationLocationReference?: number;
80
81  /**
82   * A reference that allows the client to request the location where the
83   * variable's value is declared. For example, if the variable contains a
84   * function pointer, the adapter may be able to look up the function's
85   * location. This should be present only if the adapter is likely to be able
86   * to resolve the location.
87   * 
88   * This reference shares the same lifetime as the `variablesReference`. See
89   * 'Lifetime of Object References' in the Overview section for details.
90   */
91  valueLocationReference?: number;
92}

#VariablePresentationHint

Properties of a variable that can be used to determine how to render the variable in the UI.

1interface VariablePresentationHint {
2  /**
3   * The kind of variable. Before introducing additional values, try to use the
4   * listed values.
5   * Values:
6   * 'property': Indicates that the object is a property.
7   * 'method': Indicates that the object is a method.
8   * 'class': Indicates that the object is a class.
9   * 'data': Indicates that the object is data.
10   * 'event': Indicates that the object is an event.
11   * 'baseClass': Indicates that the object is a base class.
12   * 'innerClass': Indicates that the object is an inner class.
13   * 'interface': Indicates that the object is an interface.
14   * 'mostDerivedClass': Indicates that the object is the most derived class.
15   * 'virtual': Indicates that the object is virtual, that means it is a
16   * synthetic object introduced by the adapter for rendering purposes, e.g. an
17   * index range for large arrays.
18   * 'dataBreakpoint': Deprecated: Indicates that a data breakpoint is
19   * registered for the object. The `hasDataBreakpoint` attribute should
20   * generally be used instead.
21   * etc.
22   */
23  kind?: 'property' | 'method' | 'class' | 'data' | 'event' | 'baseClass'
24      | 'innerClass' | 'interface' | 'mostDerivedClass' | 'virtual'
25      | 'dataBreakpoint' | string;
26
27  /**
28   * Set of attributes represented as an array of strings. Before introducing
29   * additional values, try to use the listed values.
30   * Values:
31   * 'static': Indicates that the object is static.
32   * 'constant': Indicates that the object is a constant.
33   * 'readOnly': Indicates that the object is read only.
34   * 'rawString': Indicates that the object is a raw string.
35   * 'hasObjectId': Indicates that the object can have an Object ID created for
36   * it. This is a vestigial attribute that is used by some clients; 'Object
37   * ID's are not specified in the protocol.
38   * 'canHaveObjectId': Indicates that the object has an Object ID associated
39   * with it. This is a vestigial attribute that is used by some clients;
40   * 'Object ID's are not specified in the protocol.
41   * 'hasSideEffects': Indicates that the evaluation had side effects.
42   * 'hasDataBreakpoint': Indicates that the object has its value tracked by a
43   * data breakpoint.
44   * etc.
45   */
46  attributes?: ('static' | 'constant' | 'readOnly' | 'rawString' | 'hasObjectId'
47      | 'canHaveObjectId' | 'hasSideEffects' | 'hasDataBreakpoint' | string)[];
48
49  /**
50   * Visibility of variable. Before introducing additional values, try to use
51   * the listed values.
52   * Values: 'public', 'private', 'protected', 'internal', 'final', etc.
53   */
54  visibility?: 'public' | 'private' | 'protected' | 'internal' | 'final' | string;
55
56  /**
57   * If true, clients can present the variable with a UI that supports a
58   * specific gesture to trigger its evaluation.
59   * This mechanism can be used for properties that require executing code when
60   * retrieving their value and where the code execution can be expensive and/or
61   * produce side-effects. A typical example are properties based on a getter
62   * function.
63   * Please note that in addition to the `lazy` flag, the variable's
64   * `variablesReference` is expected to refer to a variable that will provide
65   * the value through another `variable` request.
66   */
67  lazy?: boolean;
68}

#BreakpointLocation

Properties of a breakpoint location returned from the breakpointLocations request.

1interface BreakpointLocation {
2  /**
3   * Start line of breakpoint location.
4   */
5  line: number;
6
7  /**
8   * The start position of a breakpoint location. Position is measured in UTF-16
9   * code units and the client capability `columnsStartAt1` determines whether
10   * it is 0- or 1-based.
11   */
12  column?: number;
13
14  /**
15   * The end line of breakpoint location if the location covers a range.
16   */
17  endLine?: number;
18
19  /**
20   * The end position of a breakpoint location (if the location covers a range).
21   * Position is measured in UTF-16 code units and the client capability
22   * `columnsStartAt1` determines whether it is 0- or 1-based.
23   */
24  endColumn?: number;
25}

#SourceBreakpoint

Properties of a breakpoint or logpoint passed to the setBreakpoints request.

1interface SourceBreakpoint {
2  /**
3   * The source line of the breakpoint or logpoint.
4   */
5  line: number;
6
7  /**
8   * Start position within source line of the breakpoint or logpoint. It is
9   * measured in UTF-16 code units and the client capability `columnsStartAt1`
10   * determines whether it is 0- or 1-based.
11   */
12  column?: number;
13
14  /**
15   * The expression for conditional breakpoints.
16   * It is only honored by a debug adapter if the corresponding capability
17   * `supportsConditionalBreakpoints` is true.
18   */
19  condition?: string;
20
21  /**
22   * The expression that controls how many hits of the breakpoint are ignored.
23   * The debug adapter is expected to interpret the expression as needed.
24   * The attribute is only honored by a debug adapter if the corresponding
25   * capability `supportsHitConditionalBreakpoints` is true.
26   * If both this property and `condition` are specified, `hitCondition` should
27   * be evaluated only if the `condition` is met, and the debug adapter should
28   * stop only if both conditions are met.
29   */
30  hitCondition?: string;
31
32  /**
33   * If this attribute exists and is non-empty, the debug adapter must not
34   * 'break' (stop)
35   * but log the message instead. Expressions within `{}` are interpolated.
36   * The attribute is only honored by a debug adapter if the corresponding
37   * capability `supportsLogPoints` is true.
38   * If either `hitCondition` or `condition` is specified, then the message
39   * should only be logged if those conditions are met.
40   */
41  logMessage?: string;
42
43  /**
44   * The mode of this breakpoint. If defined, this must be one of the
45   * `breakpointModes` the debug adapter advertised in its `Capabilities`.
46   */
47  mode?: string;
48}

#FunctionBreakpoint

Properties of a breakpoint passed to the setFunctionBreakpoints request.

1interface FunctionBreakpoint {
2  /**
3   * The name of the function.
4   */
5  name: string;
6
7  /**
8   * An expression for conditional breakpoints.
9   * It is only honored by a debug adapter if the corresponding capability
10   * `supportsConditionalBreakpoints` is true.
11   */
12  condition?: string;
13
14  /**
15   * An expression that controls how many hits of the breakpoint are ignored.
16   * The debug adapter is expected to interpret the expression as needed.
17   * The attribute is only honored by a debug adapter if the corresponding
18   * capability `supportsHitConditionalBreakpoints` is true.
19   */
20  hitCondition?: string;
21}

#DataBreakpointAccessType

This enumeration defines all possible access types for data breakpoints. Values: 'read', 'write', 'readWrite'

1type DataBreakpointAccessType = 'read' | 'write' | 'readWrite';

#DataBreakpoint

Properties of a data breakpoint passed to the setDataBreakpoints request.

1interface DataBreakpoint {
2  /**
3   * An id representing the data. This id is returned from the
4   * `dataBreakpointInfo` request.
5   */
6  dataId: string;
7
8  /**
9   * The access type of the data.
10   */
11  accessType?: DataBreakpointAccessType;
12
13  /**
14   * An expression for conditional breakpoints.
15   */
16  condition?: string;
17
18  /**
19   * An expression that controls how many hits of the breakpoint are ignored.
20   * The debug adapter is expected to interpret the expression as needed.
21   */
22  hitCondition?: string;
23}

#InstructionBreakpoint

Properties of a breakpoint passed to the setInstructionBreakpoints request

1interface InstructionBreakpoint {
2  /**
3   * The instruction reference of the breakpoint.
4   * This should be a memory or instruction pointer reference from an
5   * `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or
6   * `Breakpoint`.
7   */
8  instructionReference: string;
9
10  /**
11   * The offset from the instruction reference in bytes.
12   * This can be negative.
13   */
14  offset?: number;
15
16  /**
17   * An expression for conditional breakpoints.
18   * It is only honored by a debug adapter if the corresponding capability
19   * `supportsConditionalBreakpoints` is true.
20   */
21  condition?: string;
22
23  /**
24   * An expression that controls how many hits of the breakpoint are ignored.
25   * The debug adapter is expected to interpret the expression as needed.
26   * The attribute is only honored by a debug adapter if the corresponding
27   * capability `supportsHitConditionalBreakpoints` is true.
28   */
29  hitCondition?: string;
30
31  /**
32   * The mode of this breakpoint. If defined, this must be one of the
33   * `breakpointModes` the debug adapter advertised in its `Capabilities`.
34   */
35  mode?: string;
36}

#Breakpoint

Information about a breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints requests.

1interface Breakpoint {
2  /**
3   * The identifier for the breakpoint. It is needed if breakpoint events are
4   * used to update or remove breakpoints.
5   */
6  id?: number;
7
8  /**
9   * If true, the breakpoint could be set (but not necessarily at the desired
10   * location).
11   */
12  verified: boolean;
13
14  /**
15   * A message about the state of the breakpoint.
16   * This is shown to the user and can be used to explain why a breakpoint could
17   * not be verified.
18   */
19  message?: string;
20
21  /**
22   * The source where the breakpoint is located.
23   */
24  source?: Source;
25
26  /**
27   * The start line of the actual range covered by the breakpoint.
28   */
29  line?: number;
30
31  /**
32   * Start position of the source range covered by the breakpoint. It is
33   * measured in UTF-16 code units and the client capability `columnsStartAt1`
34   * determines whether it is 0- or 1-based.
35   */
36  column?: number;
37
38  /**
39   * The end line of the actual range covered by the breakpoint.
40   */
41  endLine?: number;
42
43  /**
44   * End position of the source range covered by the breakpoint. It is measured
45   * in UTF-16 code units and the client capability `columnsStartAt1` determines
46   * whether it is 0- or 1-based.
47   * If no end line is given, then the end column is assumed to be in the start
48   * line.
49   */
50  endColumn?: number;
51
52  /**
53   * A memory reference to where the breakpoint is set.
54   */
55  instructionReference?: string;
56
57  /**
58   * The offset from the instruction reference.
59   * This can be negative.
60   */
61  offset?: number;
62
63  /**
64   * A machine-readable explanation of why a breakpoint may not be verified. If
65   * a breakpoint is verified or a specific reason is not known, the adapter
66   * should omit this property. Possible values include:
67   * 
68   * - `pending`: Indicates a breakpoint might be verified in the future, but
69   * the adapter cannot verify it in the current state.
70   * - `failed`: Indicates a breakpoint was not able to be verified, and the
71   * adapter does not believe it can be verified without intervention.
72   * Values: 'pending', 'failed'
73   */
74  reason?: 'pending' | 'failed';
75}

#SteppingGranularity

The granularity of one 'step' in the stepping requests next, stepIn, stepOut, and stepBack. Values:

  • 'statement': The step should allow the program to run until the current statement has finished executing. The meaning of a statement is determined by the adapter and it may be considered equivalent to a line. For example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.
  • 'line': The step should allow the program to run until the current source line has executed.
  • 'instruction': The step should allow one instruction to execute (e.g. one x86 instruction).
1type SteppingGranularity = 'statement' | 'line' | 'instruction';

#StepInTarget

A StepInTarget can be used in the stepIn request and determines into which single target the stepIn request should step.

1interface StepInTarget {
2  /**
3   * Unique identifier for a step-in target.
4   */
5  id: number;
6
7  /**
8   * The name of the step-in target (shown in the UI).
9   */
10  label: string;
11
12  /**
13   * The line of the step-in target.
14   */
15  line?: number;
16
17  /**
18   * Start position of the range covered by the step in target. It is measured
19   * in UTF-16 code units and the client capability `columnsStartAt1` determines
20   * whether it is 0- or 1-based.
21   */
22  column?: number;
23
24  /**
25   * The end line of the range covered by the step-in target.
26   */
27  endLine?: number;
28
29  /**
30   * End position of the range covered by the step in target. It is measured in
31   * UTF-16 code units and the client capability `columnsStartAt1` determines
32   * whether it is 0- or 1-based.
33   */
34  endColumn?: number;
35}

#GotoTarget

A GotoTarget describes a code location that can be used as a target in the goto request.

The possible goto targets can be determined via the gotoTargets request.

1interface GotoTarget {
2  /**
3   * Unique identifier for a goto target. This is used in the `goto` request.
4   */
5  id: number;
6
7  /**
8   * The name of the goto target (shown in the UI).
9   */
10  label: string;
11
12  /**
13   * The line of the goto target.
14   */
15  line: number;
16
17  /**
18   * The column of the goto target.
19   */
20  column?: number;
21
22  /**
23   * The end line of the range covered by the goto target.
24   */
25  endLine?: number;
26
27  /**
28   * The end column of the range covered by the goto target.
29   */
30  endColumn?: number;
31
32  /**
33   * A memory reference for the instruction pointer value represented by this
34   * target.
35   */
36  instructionPointerReference?: string;
37}

#CompletionItem

CompletionItems are the suggestions returned from the completions request.

1interface CompletionItem {
2  /**
3   * The label of this completion item. By default this is also the text that is
4   * inserted when selecting this completion.
5   */
6  label: string;
7
8  /**
9   * If text is returned and not an empty string, then it is inserted instead of
10   * the label.
11   */
12  text?: string;
13
14  /**
15   * A string that should be used when comparing this item with other items. If
16   * not returned or an empty string, the `label` is used instead.
17   */
18  sortText?: string;
19
20  /**
21   * A human-readable string with additional information about this item, like
22   * type or symbol information.
23   */
24  detail?: string;
25
26  /**
27   * The item's type. Typically the client uses this information to render the
28   * item in the UI with an icon.
29   */
30  type?: CompletionItemType;
31
32  /**
33   * Start position (within the `text` attribute of the `completions` request)
34   * where the completion text is added. The position is measured in UTF-16 code
35   * units and the client capability `columnsStartAt1` determines whether it is
36   * 0- or 1-based. If the start position is omitted the text is added at the
37   * location specified by the `column` attribute of the `completions` request.
38   */
39  start?: number;
40
41  /**
42   * Length determines how many characters are overwritten by the completion
43   * text and it is measured in UTF-16 code units. If missing the value 0 is
44   * assumed which results in the completion text being inserted.
45   */
46  length?: number;
47
48  /**
49   * Determines the start of the new selection after the text has been inserted
50   * (or replaced). `selectionStart` is measured in UTF-16 code units and must
51   * be in the range 0 and length of the completion text. If omitted the
52   * selection starts at the end of the completion text.
53   */
54  selectionStart?: number;
55
56  /**
57   * Determines the length of the new selection after the text has been inserted
58   * (or replaced) and it is measured in UTF-16 code units. The selection can
59   * not extend beyond the bounds of the completion text. If omitted the length
60   * is assumed to be 0.
61   */
62  selectionLength?: number;
63}

#CompletionItemType

Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. Values: 'method', 'function', 'constructor', 'field', 'variable', 'class', 'interface', 'module', 'property', 'unit', 'value', 'enum', 'keyword', 'snippet', 'text', 'color', 'file', 'reference', 'customcolor'

1type CompletionItemType = 'method' | 'function' | 'constructor' | 'field'
2    | 'variable' | 'class' | 'interface' | 'module' | 'property' | 'unit'
3    | 'value' | 'enum' | 'keyword' | 'snippet' | 'text' | 'color' | 'file'
4    | 'reference' | 'customcolor';

#ChecksumAlgorithm

Names of checksum algorithms that may be supported by a debug adapter. Values: 'MD5', 'SHA1', 'SHA256', 'timestamp'

1type ChecksumAlgorithm = 'MD5' | 'SHA1' | 'SHA256' | 'timestamp';

#Checksum

The checksum of an item calculated by the specified algorithm.

1interface Checksum {
2  /**
3   * The algorithm used to calculate this checksum.
4   */
5  algorithm: ChecksumAlgorithm;
6
7  /**
8   * Value of the checksum, encoded as a hexadecimal value.
9   */
10  checksum: string;
11}

#ValueFormat

Provides formatting information for a value.

1interface ValueFormat {
2  /**
3   * Display the value in hex.
4   */
5  hex?: boolean;
6}

#StackFrameFormat

Provides formatting information for a stack frame.

1interface StackFrameFormat extends ValueFormat {
2  /**
3   * Displays parameters for the stack frame.
4   */
5  parameters?: boolean;
6
7  /**
8   * Displays the types of parameters for the stack frame.
9   */
10  parameterTypes?: boolean;
11
12  /**
13   * Displays the names of parameters for the stack frame.
14   */
15  parameterNames?: boolean;
16
17  /**
18   * Displays the values of parameters for the stack frame.
19   */
20  parameterValues?: boolean;
21
22  /**
23   * Displays the line number of the stack frame.
24   */
25  line?: boolean;
26
27  /**
28   * Displays the module of the stack frame.
29   */
30  module?: boolean;
31
32  /**
33   * Includes all stack frames, including those the debug adapter might
34   * otherwise hide.
35   */
36  includeAll?: boolean;
37}

#ExceptionFilterOptions

An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionBreakpoints request.

1interface ExceptionFilterOptions {
2  /**
3   * ID of an exception filter returned by the `exceptionBreakpointFilters`
4   * capability.
5   */
6  filterId: string;
7
8  /**
9   * An expression for conditional exceptions.
10   * The exception breaks into the debugger if the result of the condition is
11   * true.
12   */
13  condition?: string;
14
15  /**
16   * The mode of this exception breakpoint. If defined, this must be one of the
17   * `breakpointModes` the debug adapter advertised in its `Capabilities`.
18   */
19  mode?: string;
20}

#ExceptionOptions

An ExceptionOptions assigns configuration options to a set of exceptions.

1interface ExceptionOptions {
2  /**
3   * A path that selects a single or multiple exceptions in a tree. If `path` is
4   * missing, the whole tree is selected.
5   * By convention the first segment of the path is a category that is used to
6   * group exceptions in the UI.
7   */
8  path?: ExceptionPathSegment[];
9
10  /**
11   * Condition when a thrown exception should result in a break.
12   */
13  breakMode: ExceptionBreakMode;
14}

#ExceptionBreakMode

This enumeration defines all possible conditions when a thrown exception should result in a break.

never: never breaks,

always: always breaks,

unhandled: breaks when exception unhandled,

userUnhandled: breaks if the exception is not handled by user code. Values: 'never', 'always', 'unhandled', 'userUnhandled'

1type ExceptionBreakMode = 'never' | 'always' | 'unhandled'
2    | 'userUnhandled';

#ExceptionPathSegment

An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.

If a segment consists of more than one name, it matches the names provided if negate is false or missing, or it matches anything except the names provided if negate is true.

1interface ExceptionPathSegment {
2  /**
3   * If false or missing this segment matches the names provided, otherwise it
4   * matches anything except the names provided.
5   */
6  negate?: boolean;
7
8  /**
9   * Depending on the value of `negate` the names that should match or not
10   * match.
11   */
12  names: string[];
13}

#ExceptionDetails

Detailed information about an exception that has occurred.

1interface ExceptionDetails {
2  /**
3   * Message contained in the exception.
4   */
5  message?: string;
6
7  /**
8   * Short type name of the exception object.
9   */
10  typeName?: string;
11
12  /**
13   * Fully-qualified type name of the exception object.
14   */
15  fullTypeName?: string;
16
17  /**
18   * An expression that can be evaluated in the current scope to obtain the
19   * exception object.
20   */
21  evaluateName?: string;
22
23  /**
24   * Stack trace at the time the exception was thrown.
25   */
26  stackTrace?: string;
27
28  /**
29   * Details of the exception contained by this exception, if any.
30   */
31  innerException?: ExceptionDetails[];
32}

#DisassembledInstruction

Represents a single disassembled instruction.

1interface DisassembledInstruction {
2  /**
3   * The address of the instruction. Treated as a hex value if prefixed with
4   * `0x`, or as a decimal value otherwise.
5   */
6  address: string;
7
8  /**
9   * Raw bytes representing the instruction and its operands, in an
10   * implementation-defined format.
11   */
12  instructionBytes?: string;
13
14  /**
15   * Text representing the instruction and its operands, in an
16   * implementation-defined format.
17   */
18  instruction: string;
19
20  /**
21   * Name of the symbol that corresponds with the location of this instruction,
22   * if any.
23   */
24  symbol?: string;
25
26  /**
27   * Source location that corresponds to this instruction, if any.
28   * Should always be set (if available) on the first instruction returned,
29   * but can be omitted afterwards if this instruction maps to the same source
30   * file as the previous instruction.
31   */
32  location?: Source;
33
34  /**
35   * The line within the source location that corresponds to this instruction,
36   * if any.
37   */
38  line?: number;
39
40  /**
41   * The column within the line that corresponds to this instruction, if any.
42   */
43  column?: number;
44
45  /**
46   * The end line of the range that corresponds to this instruction, if any.
47   */
48  endLine?: number;
49
50  /**
51   * The end column of the range that corresponds to this instruction, if any.
52   */
53  endColumn?: number;
54
55  /**
56   * A hint for how to present the instruction in the UI.
57   * 
58   * A value of `invalid` may be used to indicate this instruction is 'filler'
59   * and cannot be reached by the program. For example, unreadable memory
60   * addresses may be presented is 'invalid.'
61   * Values: 'normal', 'invalid'
62   */
63  presentationHint?: 'normal' | 'invalid';
64}

#InvalidatedAreas

Logical areas that can be invalidated by the invalidated event. Values:

  • 'all': All previously fetched data has become invalid and needs to be refetched.
  • 'stacks': Previously fetched stack related data has become invalid and needs to be refetched.
  • 'threads': Previously fetched thread related data has become invalid and needs to be refetched.
  • 'variables': Previously fetched variable data has become invalid and needs to be refetched. etc.
1export type InvalidatedAreas = 'all' | 'stacks' | 'threads' | 'variables'
2    | string;

#BreakpointMode

A BreakpointMode is provided as a option when setting breakpoints on sources or instructions.

1interface BreakpointMode {
2  /**
3   * The internal ID of the mode. This value is passed to the `setBreakpoints`
4   * request.
5   */
6  mode: string;
7
8  /**
9   * The name of the breakpoint mode. This is shown in the UI.
10   */
11  label: string;
12
13  /**
14   * A help text providing additional information about the breakpoint mode.
15   * This string is typically shown as a hover and can be translated.
16   */
17  description?: string;
18
19  /**
20   * Describes one or more type of breakpoint this mode applies to.
21   */
22  appliesTo: BreakpointModeApplicability[];
23}

#BreakpointModeApplicability

Describes one or more type of breakpoint a BreakpointMode applies to. This is a non-exhaustive enumeration and may expand as future breakpoint types are added. Values:

  • 'source': In SourceBreakpoints
  • 'exception': In exception breakpoints applied in the ExceptionFilterOptions
  • 'data': In data breakpoints requested in the DataBreakpointInfo request
  • 'instruction': In InstructionBreakpoints etc.
1export type BreakpointModeApplicability = 'source' | 'exception' | 'data'
2    | 'instruction' | string;