Path: blob/main/src/vs/workbench/contrib/debug/common/debugProtocol.d.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45/** Declaration module describing the VS Code debug protocol.6Auto-generated from json schema. Do not edit manually.7*/8declare module DebugProtocol {910/** Base class of requests, responses, and events. */11interface ProtocolMessage {12/** Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request. */13seq: number;14/** Message type.15Values: 'request', 'response', 'event', etc.16*/17type: 'request' | 'response' | 'event' | string;18}1920/** A client or debug adapter initiated request. */21interface Request extends ProtocolMessage {22// type: 'request';23/** The command to execute. */24command: string;25/** Object containing arguments for the command. */26arguments?: any;27}2829/** A debug adapter initiated event. */30interface Event extends ProtocolMessage {31// type: 'event';32/** Type of event. */33event: string;34/** Event-specific information. */35body?: any;36}3738/** Response for a request. */39interface Response extends ProtocolMessage {40// type: 'response';41/** Sequence number of the corresponding request. */42request_seq: number;43/** Outcome of the request.44If true, the request was successful and the `body` attribute may contain the result of the request.45If the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`).46*/47success: boolean;48/** The command requested. */49command: string;50/** Contains the raw error in short form if `success` is false.51This raw error might be interpreted by the client and is not shown in the UI.52Some predefined values exist.53Values:54'cancelled': the request was cancelled.55'notStopped': the request may be retried once the adapter is in a 'stopped' state.56etc.57*/58message?: 'cancelled' | 'notStopped' | string;59/** Contains request result if success is true and error details if success is false. */60body?: any;61}6263/** On error (whenever `success` is false), the body can provide more details. */64interface ErrorResponse extends Response {65body: {66/** A structured error message. */67error?: Message;68};69}7071/** Cancel request; value of command field is 'cancel'.72The `cancel` request is used by the client in two situations:73- to indicate that it is no longer interested in the result produced by a specific request issued earlier74- to cancel a progress sequence.75Clients should only call this request if the corresponding capability `supportsCancelRequest` is true.76This 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.77The `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.78The 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`).79Returning 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.80The progress that got cancelled still needs to send a `progressEnd` event back.81A client should not assume that progress just got cancelled after sending the `cancel` request.82*/83interface CancelRequest extends Request {84// command: 'cancel';85arguments?: CancelArguments;86}8788/** Arguments for `cancel` request. */89interface CancelArguments {90/** The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.91Both a `requestId` and a `progressId` can be specified in one request.92*/93requestId?: number;94/** The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.95Both a `requestId` and a `progressId` can be specified in one request.96*/97progressId?: string;98}99100/** Response to `cancel` request. This is just an acknowledgement, so no body field is required. */101interface CancelResponse extends Response {102}103104/** Event message for 'initialized' event type.105This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).106A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).107The sequence of events/requests is as follows:108- adapters sends `initialized` event (after the `initialize` request has returned)109- client sends zero or more `setBreakpoints` requests110- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)111- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)112- client sends other future configuration requests113- client sends one `configurationDone` request to indicate the end of the configuration.114*/115interface InitializedEvent extends Event {116// event: 'initialized';117}118119/** Event message for 'stopped' event type.120The event indicates that the execution of the debuggee has stopped due to some condition.121This can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.122*/123interface StoppedEvent extends Event {124// event: 'stopped';125body: {126/** The reason for the event.127For backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).128Values: 'step', 'breakpoint', 'exception', 'pause', 'entry', 'goto', 'function breakpoint', 'data breakpoint', 'instruction breakpoint', etc.129*/130reason: 'step' | 'breakpoint' | 'exception' | 'pause' | 'entry' | 'goto' | 'function breakpoint' | 'data breakpoint' | 'instruction breakpoint' | string;131/** The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated. */132description?: string;133/** The thread which was stopped. */134threadId?: number;135/** A value of true hints to the client that this event should not change the focus. */136preserveFocusHint?: boolean;137/** Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI. */138text?: string;139/** If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.140- The client should use this information to enable that all threads can be expanded to access their stacktraces.141- If the attribute is missing or false, only the thread with the given `threadId` can be expanded.142*/143allThreadsStopped?: boolean;144/** Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:145- Different types of breakpoints map to the same location.146- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.147- Multiple function breakpoints with different function names map to the same location.148*/149hitBreakpointIds?: number[];150};151}152153/** Event message for 'continued' event type.154The event indicates that the execution of the debuggee has continued.155Please 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`.156It is only necessary to send a `continued` event if there was no previous request that implied this.157*/158interface ContinuedEvent extends Event {159// event: 'continued';160body: {161/** The thread which was continued. */162threadId: number;163/** If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued. */164allThreadsContinued?: boolean;165};166}167168/** Event message for 'exited' event type.169The event indicates that the debuggee has exited and returns its exit code.170*/171interface ExitedEvent extends Event {172// event: 'exited';173body: {174/** The exit code returned from the debuggee. */175exitCode: number;176};177}178179/** Event message for 'terminated' event type.180The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.181*/182interface TerminatedEvent extends Event {183// event: 'terminated';184body?: {185/** A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.186The value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests.187*/188restart?: any;189};190}191192/** Event message for 'thread' event type.193The event indicates that a thread has started or exited.194*/195interface ThreadEvent extends Event {196// event: 'thread';197body: {198/** The reason for the event.199Values: 'started', 'exited', etc.200*/201reason: 'started' | 'exited' | string;202/** The identifier of the thread. */203threadId: number;204};205}206207/** Event message for 'output' event type.208The event indicates that the target has produced some output.209*/210interface OutputEvent extends Event {211// event: 'output';212body: {213/** The output category. If not specified or if the category is not understood by the client, `console` is assumed.214Values:215'console': Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).216'important': A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.217'stdout': Show the output as normal program output from the debuggee.218'stderr': Show the output as error program output from the debuggee.219'telemetry': Send the output to telemetry instead of showing it to the user.220etc.221*/222category?: 'console' | 'important' | 'stdout' | 'stderr' | 'telemetry' | string;223/** The output to report.224225ANSI escape sequences may be used to inflience text color and styling if `supportsANSIStyling` is present in both the adapter's `Capabilities` and the client's `InitializeRequestArguments`. A client may strip any unrecognized ANSI sequences.226227If the `supportsANSIStyling` capabilities are not both true, then the client should display the output literally.228*/229output: string;230/** Support for keeping an output log organized by grouping related messages.231'start': Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.232The `output` attribute becomes the name of the group and is not indented.233'startCollapsed': Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).234The `output` attribute becomes the name of the group and is not indented.235'end': End the current group and decrease the indentation of subsequent output events.236A non-empty `output` attribute is shown as the unindented end of the group.237*/238group?: 'start' | 'startCollapsed' | 'end';239/** If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. */240variablesReference?: number;241/** The source location where the output was produced. */242source?: Source;243/** The source location's line where the output was produced. */244line?: number;245/** The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */246column?: number;247/** Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format. */248data?: any;249/** A reference that allows the client to request the location where the new value is declared. For example, if the logged value is function pointer, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.250251This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.252*/253locationReference?: number;254};255}256257/** Event message for 'breakpoint' event type.258The event indicates that some information about a breakpoint has changed.259*/260interface BreakpointEvent extends Event {261// event: 'breakpoint';262body: {263/** The reason for the event.264Values: 'changed', 'new', 'removed', etc.265*/266reason: 'changed' | 'new' | 'removed' | string;267/** The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values. */268breakpoint: Breakpoint;269};270}271272/** Event message for 'module' event type.273The event indicates that some information about a module has changed.274*/275interface ModuleEvent extends Event {276// event: 'module';277body: {278/** The reason for the event. */279reason: 'new' | 'changed' | 'removed';280/** The new, changed, or removed module. In case of `removed` only the module id is used. */281module: Module;282};283}284285/** Event message for 'loadedSource' event type.286The event indicates that some source has been added, changed, or removed from the set of all loaded sources.287*/288interface LoadedSourceEvent extends Event {289// event: 'loadedSource';290body: {291/** The reason for the event. */292reason: 'new' | 'changed' | 'removed';293/** The new, changed, or removed source. */294source: Source;295};296}297298/** Event message for 'process' event type.299The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.300*/301interface ProcessEvent extends Event {302// event: 'process';303body: {304/** The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js. */305name: string;306/** The process ID of the debugged process, as assigned by the operating system. This property should be omitted for logical processes that do not map to operating system processes on the machine. */307systemProcessId?: number;308/** If true, the process is running on the same computer as the debug adapter. */309isLocalProcess?: boolean;310/** Describes how the debug engine started debugging this process.311'launch': Process was launched under the debugger.312'attach': Debugger attached to an existing process.313'attachForSuspendedLaunch': A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.314*/315startMethod?: 'launch' | 'attach' | 'attachForSuspendedLaunch';316/** The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display. */317pointerSize?: number;318};319}320321/** Event message for 'capabilities' event type.322The event indicates that one or more capabilities have changed.323Since the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).324Consequently 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.325Only changed capabilities need to be included, all other capabilities keep their values.326*/327interface CapabilitiesEvent extends Event {328// event: 'capabilities';329body: {330/** The set of updated capabilities. */331capabilities: Capabilities;332};333}334335/** Event message for 'progressStart' event type.336The 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.337The client is free to delay the showing of the UI in order to reduce flicker.338This event should only be sent if the corresponding capability `supportsProgressReporting` is true.339*/340interface ProgressStartEvent extends Event {341// event: 'progressStart';342body: {343/** An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.344IDs must be unique within a debug session.345*/346progressId: string;347/** Short title of the progress reporting. Shown in the UI to describe the long running operation. */348title: string;349/** The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.350If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.351*/352requestId?: number;353/** If true, the request that reports progress may be cancelled with a `cancel` request.354So this property basically controls whether the client should use UX that supports cancellation.355Clients that don't support cancellation are allowed to ignore the setting.356*/357cancellable?: boolean;358/** More detailed progress message. */359message?: string;360/** Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. */361percentage?: number;362};363}364365/** Event message for 'progressUpdate' event type.366The event signals that the progress reporting needs to be updated with a new message and/or percentage.367The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.368This event should only be sent if the corresponding capability `supportsProgressReporting` is true.369*/370interface ProgressUpdateEvent extends Event {371// event: 'progressUpdate';372body: {373/** The ID that was introduced in the initial `progressStart` event. */374progressId: string;375/** More detailed progress message. If omitted, the previous message (if any) is used. */376message?: string;377/** Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown. */378percentage?: number;379};380}381382/** Event message for 'progressEnd' event type.383The event signals the end of the progress reporting with a final message.384This event should only be sent if the corresponding capability `supportsProgressReporting` is true.385*/386interface ProgressEndEvent extends Event {387// event: 'progressEnd';388body: {389/** The ID that was introduced in the initial `ProgressStartEvent`. */390progressId: string;391/** More detailed progress message. If omitted, the previous message (if any) is used. */392message?: string;393};394}395396/** Event message for 'invalidated' event type.397This 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.398Debug 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.399This event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.400*/401interface InvalidatedEvent extends Event {402// event: 'invalidated';403body: {404/** Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`. */405areas?: InvalidatedAreas[];406/** If specified, the client only needs to refetch data related to this thread. */407threadId?: number;408/** If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored). */409stackFrameId?: number;410};411}412413/** Event message for 'memory' event type.414This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.415Clients 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.416Debug 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.417*/418interface MemoryEvent extends Event {419// event: 'memory';420body: {421/** Memory reference of a memory range that has been updated. */422memoryReference: string;423/** Starting offset in bytes where memory has been updated. Can be negative. */424offset: number;425/** Number of bytes updated. */426count: number;427};428}429430/** RunInTerminal request; value of command field is 'runInTerminal'.431This request is sent from the debug adapter to the client to run a command in a terminal.432This is typically used to launch the debuggee in a terminal provided by the client.433This request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.434Client 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.435Some 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.436*/437interface RunInTerminalRequest extends Request {438// command: 'runInTerminal';439arguments: RunInTerminalRequestArguments;440}441442/** Arguments for `runInTerminal` request. */443interface RunInTerminalRequestArguments {444/** What kind of terminal to launch. Defaults to `integrated` if not specified. */445kind?: 'integrated' | 'external';446/** Title of the terminal. */447title?: string;448/** Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. */449cwd: string;450/** List of arguments. The first argument is the command to run. */451args: string[];452/** Environment key-value pairs that are added to or removed from the default environment. */453env?: { [key: string]: string | null; };454/** This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells. */455argsCanBeInterpretedByShell?: boolean;456}457458/** Response to `runInTerminal` request. */459interface RunInTerminalResponse extends Response {460body: {461/** The process ID. The value should be less than or equal to 2147483647 (2^31-1). */462processId?: number;463/** The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1). */464shellProcessId?: number;465};466}467468/** StartDebugging request; value of command field is 'startDebugging'.469This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.470This request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.471A 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.472*/473interface StartDebuggingRequest extends Request {474// command: 'startDebugging';475arguments: StartDebuggingRequestArguments;476}477478/** Arguments for `startDebugging` request. */479interface StartDebuggingRequestArguments {480/** Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables'). */481configuration: { [key: string]: any; };482/** Indicates whether the new debug session should be started with a `launch` or `attach` request. */483request: 'launch' | 'attach';484}485486/** Response to `startDebugging` request. This is just an acknowledgement, so no body field is required. */487interface StartDebuggingResponse extends Response {488}489490/** Initialize request; value of command field is 'initialize'.491The `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.492Until the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.493In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.494The `initialize` request may only be sent once.495*/496interface InitializeRequest extends Request {497// command: 'initialize';498arguments: InitializeRequestArguments;499}500501/** Arguments for `initialize` request. */502interface InitializeRequestArguments {503/** The ID of the client using this adapter. */504clientID?: string;505/** The human-readable name of the client using this adapter. */506clientName?: string;507/** The ID of the debug adapter. */508adapterID: string;509/** The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH. */510locale?: string;511/** If true all line numbers are 1-based (default). */512linesStartAt1?: boolean;513/** If true all column numbers are 1-based (default). */514columnsStartAt1?: boolean;515/** Determines in what format paths are specified. The default is `path`, which is the native format.516Values: 'path', 'uri', etc.517*/518pathFormat?: 'path' | 'uri' | string;519/** Client supports the `type` attribute for variables. */520supportsVariableType?: boolean;521/** Client supports the paging of variables. */522supportsVariablePaging?: boolean;523/** Client supports the `runInTerminal` request. */524supportsRunInTerminalRequest?: boolean;525/** Client supports memory references. */526supportsMemoryReferences?: boolean;527/** Client supports progress reporting. */528supportsProgressReporting?: boolean;529/** Client supports the `invalidated` event. */530supportsInvalidatedEvent?: boolean;531/** Client supports the `memory` event. */532supportsMemoryEvent?: boolean;533/** Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request. */534supportsArgsCanBeInterpretedByShell?: boolean;535/** Client supports the `startDebugging` request. */536supportsStartDebuggingRequest?: boolean;537/** The client will interpret ANSI escape sequences in the display of `OutputEvent.output` and `Variable.value` fields when `Capabilities.supportsANSIStyling` is also enabled. */538supportsANSIStyling?: boolean;539}540541/** Response to `initialize` request. */542interface InitializeResponse extends Response {543/** The capabilities of this debug adapter. */544body?: Capabilities;545}546547/** ConfigurationDone request; value of command field is 'configurationDone'.548This request indicates that the client has finished initialization of the debug adapter.549So it is the last request in the sequence of configuration requests (which was started by the `initialized` event).550Clients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.551*/552interface ConfigurationDoneRequest extends Request {553// command: 'configurationDone';554arguments?: ConfigurationDoneArguments;555}556557/** Arguments for `configurationDone` request. */558interface ConfigurationDoneArguments {559}560561/** Response to `configurationDone` request. This is just an acknowledgement, so no body field is required. */562interface ConfigurationDoneResponse extends Response {563}564565/** Launch request; value of command field is 'launch'.566This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).567Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.568*/569interface LaunchRequest extends Request {570// command: 'launch';571arguments: LaunchRequestArguments;572}573574/** Arguments for `launch` request. Additional attributes are implementation specific. */575interface LaunchRequestArguments {576/** If true, the launch request should launch the program without enabling debugging. */577noDebug?: boolean;578/** Arbitrary data from the previous, restarted session.579The data is sent as the `restart` attribute of the `terminated` event.580The client should leave the data intact.581*/582__restart?: any;583}584585/** Response to `launch` request. This is just an acknowledgement, so no body field is required. */586interface LaunchResponse extends Response {587}588589/** Attach request; value of command field is 'attach'.590The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.591Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification.592*/593interface AttachRequest extends Request {594// command: 'attach';595arguments: AttachRequestArguments;596}597598/** Arguments for `attach` request. Additional attributes are implementation specific. */599interface AttachRequestArguments {600/** Arbitrary data from the previous, restarted session.601The data is sent as the `restart` attribute of the `terminated` event.602The client should leave the data intact.603*/604__restart?: any;605}606607/** Response to `attach` request. This is just an acknowledgement, so no body field is required. */608interface AttachResponse extends Response {609}610611/** Restart request; value of command field is 'restart'.612Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.613If 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.614*/615interface RestartRequest extends Request {616// command: 'restart';617arguments?: RestartArguments;618}619620/** Arguments for `restart` request. */621interface RestartArguments {622/** The latest version of the `launch` or `attach` configuration. */623arguments?: LaunchRequestArguments | AttachRequestArguments;624}625626/** Response to `restart` request. This is just an acknowledgement, so no body field is required. */627interface RestartResponse extends Response {628}629630/** Disconnect request; value of command field is 'disconnect'.631The `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).632In 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.633This 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).634*/635interface DisconnectRequest extends Request {636// command: 'disconnect';637arguments?: DisconnectArguments;638}639640/** Arguments for `disconnect` request. */641interface DisconnectArguments {642/** A value of true indicates that this `disconnect` request is part of a restart sequence. */643restart?: boolean;644/** Indicates whether the debuggee should be terminated when the debugger is disconnected.645If unspecified, the debug adapter is free to do whatever it thinks is best.646The attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true.647*/648terminateDebuggee?: boolean;649/** Indicates whether the debuggee should stay suspended when the debugger is disconnected.650If unspecified, the debuggee should resume execution.651The attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true.652*/653suspendDebuggee?: boolean;654}655656/** Response to `disconnect` request. This is just an acknowledgement, so no body field is required. */657interface DisconnectResponse extends Response {658}659660/** Terminate request; value of command field is 'terminate'.661The `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.662Typically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.663Please 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.664Clients 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.665*/666interface TerminateRequest extends Request {667// command: 'terminate';668arguments?: TerminateArguments;669}670671/** Arguments for `terminate` request. */672interface TerminateArguments {673/** A value of true indicates that this `terminate` request is part of a restart sequence. */674restart?: boolean;675}676677/** Response to `terminate` request. This is just an acknowledgement, so no body field is required. */678interface TerminateResponse extends Response {679}680681/** BreakpointLocations request; value of command field is 'breakpointLocations'.682The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.683Clients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.684*/685interface BreakpointLocationsRequest extends Request {686// command: 'breakpointLocations';687arguments?: BreakpointLocationsArguments;688}689690/** Arguments for `breakpointLocations` request. */691interface BreakpointLocationsArguments {692/** The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified. */693source: Source;694/** Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line. */695line: number;696/** Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. */697column?: number;698/** End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line. */699endLine?: number;700/** End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed. */701endColumn?: number;702}703704/** Response to `breakpointLocations` request.705Contains possible locations for source breakpoints.706*/707interface BreakpointLocationsResponse extends Response {708body: {709/** Sorted set of possible breakpoint locations. */710breakpoints: BreakpointLocation[];711};712}713714/** SetBreakpoints request; value of command field is 'setBreakpoints'.715Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.716To clear all breakpoint for a source, specify an empty array.717When a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.718*/719interface SetBreakpointsRequest extends Request {720// command: 'setBreakpoints';721arguments: SetBreakpointsArguments;722}723724/** Arguments for `setBreakpoints` request. */725interface SetBreakpointsArguments {726/** The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified. */727source: Source;728/** The code locations of the breakpoints. */729breakpoints?: SourceBreakpoint[];730/** Deprecated: The code locations of the breakpoints. */731lines?: number[];732/** A value of true indicates that the underlying source has been modified which results in new breakpoint locations. */733sourceModified?: boolean;734}735736/** Response to `setBreakpoints` request.737Returned is information about each breakpoint created by this request.738This includes the actual code location and whether the breakpoint could be verified.739The breakpoints returned are in the same order as the elements of the `breakpoints`740(or the deprecated `lines`) array in the arguments.741*/742interface SetBreakpointsResponse extends Response {743body: {744/** Information about the breakpoints.745The array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments.746*/747breakpoints: Breakpoint[];748};749}750751/** SetFunctionBreakpoints request; value of command field is 'setFunctionBreakpoints'.752Replaces all existing function breakpoints with new function breakpoints.753To clear all function breakpoints, specify an empty array.754When a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.755Clients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.756*/757interface SetFunctionBreakpointsRequest extends Request {758// command: 'setFunctionBreakpoints';759arguments: SetFunctionBreakpointsArguments;760}761762/** Arguments for `setFunctionBreakpoints` request. */763interface SetFunctionBreakpointsArguments {764/** The function names of the breakpoints. */765breakpoints: FunctionBreakpoint[];766}767768/** Response to `setFunctionBreakpoints` request.769Returned is information about each breakpoint created by this request.770*/771interface SetFunctionBreakpointsResponse extends Response {772body: {773/** Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array. */774breakpoints: Breakpoint[];775};776}777778/** SetExceptionBreakpoints request; value of command field is 'setExceptionBreakpoints'.779The 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.780Clients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.781*/782interface SetExceptionBreakpointsRequest extends Request {783// command: 'setExceptionBreakpoints';784arguments: SetExceptionBreakpointsArguments;785}786787/** Arguments for `setExceptionBreakpoints` request. */788interface SetExceptionBreakpointsArguments {789/** Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive. */790filters: string[];791/** Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive. */792filterOptions?: ExceptionFilterOptions[];793/** Configuration options for selected exceptions.794The attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true.795*/796exceptionOptions?: ExceptionOptions[];797}798799/** Response to `setExceptionBreakpoints` request.800The 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.801The `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.802For 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.803*/804interface SetExceptionBreakpointsResponse extends Response {805body?: {806/** Information about the exception breakpoints or filters.807The breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.808*/809breakpoints?: Breakpoint[];810};811}812813/** DataBreakpointInfo request; value of command field is 'dataBreakpointInfo'.814Obtains information on a possible data breakpoint that could be set on an expression or variable.815Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.816*/817interface DataBreakpointInfoRequest extends Request {818// command: 'dataBreakpointInfo';819arguments: DataBreakpointInfoArguments;820}821822/** Arguments for `dataBreakpointInfo` request. */823interface DataBreakpointInfoArguments {824/** Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. */825variablesReference?: number;826/** The name of the variable's child to obtain data breakpoint information for.827If `variablesReference` isn't specified, this can be an expression, or an address if `asAddress` is also true.828*/829name: string;830/** When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect. */831frameId?: number;832/** If specified, a debug adapter should return information for the range of memory extending `bytes` number of bytes from the address or variable specified by `name`. Breakpoints set using the resulting data ID should pause on data access anywhere within that range.833834Clients may set this property only if the `supportsDataBreakpointBytes` capability is true.835*/836bytes?: number;837/** If `true`, the `name` is a memory address and the debugger should interpret it as a decimal value, or hex value if it is prefixed with `0x`.838839Clients may set this property only if the `supportsDataBreakpointBytes`840capability is true.841*/842asAddress?: boolean;843/** The mode of the desired breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`. */844mode?: string;845}846847/** Response to `dataBreakpointInfo` request. */848interface DataBreakpointInfoResponse extends Response {849body: {850/** An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`. */851dataId: string | null;852/** UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available. */853description: string;854/** Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information. */855accessTypes?: DataBreakpointAccessType[];856/** Attribute indicates that a potential data breakpoint could be persisted across sessions. */857canPersist?: boolean;858};859}860861/** SetDataBreakpoints request; value of command field is 'setDataBreakpoints'.862Replaces all existing data breakpoints with new data breakpoints.863To clear all data breakpoints, specify an empty array.864When a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.865Clients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.866*/867interface SetDataBreakpointsRequest extends Request {868// command: 'setDataBreakpoints';869arguments: SetDataBreakpointsArguments;870}871872/** Arguments for `setDataBreakpoints` request. */873interface SetDataBreakpointsArguments {874/** The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. */875breakpoints: DataBreakpoint[];876}877878/** Response to `setDataBreakpoints` request.879Returned is information about each breakpoint created by this request.880*/881interface SetDataBreakpointsResponse extends Response {882body: {883/** Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array. */884breakpoints: Breakpoint[];885};886}887888/** SetInstructionBreakpoints request; value of command field is 'setInstructionBreakpoints'.889Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window.890To clear all instruction breakpoints, specify an empty array.891When an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.892Clients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.893*/894interface SetInstructionBreakpointsRequest extends Request {895// command: 'setInstructionBreakpoints';896arguments: SetInstructionBreakpointsArguments;897}898899/** Arguments for `setInstructionBreakpoints` request */900interface SetInstructionBreakpointsArguments {901/** The instruction references of the breakpoints */902breakpoints: InstructionBreakpoint[];903}904905/** Response to `setInstructionBreakpoints` request */906interface SetInstructionBreakpointsResponse extends Response {907body: {908/** Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array. */909breakpoints: Breakpoint[];910};911}912913/** Continue request; value of command field is 'continue'.914The 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.915*/916interface ContinueRequest extends Request {917// command: 'continue';918arguments: ContinueArguments;919}920921/** Arguments for `continue` request. */922interface ContinueArguments {923/** Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed. */924threadId: number;925/** If this flag is true, execution is resumed only for the thread with given `threadId`. */926singleThread?: boolean;927}928929/** Response to `continue` request. */930interface ContinueResponse extends Response {931body: {932/** The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed. */933allThreadsContinued?: boolean;934};935}936937/** Next request; value of command field is 'next'.938The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.939If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.940The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.941*/942interface NextRequest extends Request {943// command: 'next';944arguments: NextArguments;945}946947/** Arguments for `next` request. */948interface NextArguments {949/** Specifies the thread for which to resume execution for one step (of the given granularity). */950threadId: number;951/** If this flag is true, all other suspended threads are not resumed. */952singleThread?: boolean;953/** Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. */954granularity?: SteppingGranularity;955}956957/** Response to `next` request. This is just an acknowledgement, so no body field is required. */958interface NextResponse extends Response {959}960961/** StepIn request; value of command field is 'stepIn'.962The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.963If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.964If the request cannot step into a target, `stepIn` behaves like the `next` request.965The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.966If there are multiple function/method calls (or other targets) on the source line,967the argument `targetId` can be used to control into which target the `stepIn` should occur.968The list of possible targets for a given source line can be retrieved via the `stepInTargets` request.969*/970interface StepInRequest extends Request {971// command: 'stepIn';972arguments: StepInArguments;973}974975/** Arguments for `stepIn` request. */976interface StepInArguments {977/** Specifies the thread for which to resume execution for one step-into (of the given granularity). */978threadId: number;979/** If this flag is true, all other suspended threads are not resumed. */980singleThread?: boolean;981/** Id of the target to step into. */982targetId?: number;983/** Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. */984granularity?: SteppingGranularity;985}986987/** Response to `stepIn` request. This is just an acknowledgement, so no body field is required. */988interface StepInResponse extends Response {989}990991/** StepOut request; value of command field is 'stepOut'.992The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.993If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.994The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.995*/996interface StepOutRequest extends Request {997// command: 'stepOut';998arguments: StepOutArguments;999}10001001/** Arguments for `stepOut` request. */1002interface StepOutArguments {1003/** Specifies the thread for which to resume execution for one step-out (of the given granularity). */1004threadId: number;1005/** If this flag is true, all other suspended threads are not resumed. */1006singleThread?: boolean;1007/** Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed. */1008granularity?: SteppingGranularity;1009}10101011/** Response to `stepOut` request. This is just an acknowledgement, so no body field is required. */1012interface StepOutResponse extends Response {1013}10141015/** StepBack request; value of command field is 'stepBack'.1016The 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.1017If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.1018The debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.1019Clients should only call this request if the corresponding capability `supportsStepBack` is true.1020*/1021interface StepBackRequest extends Request {1022// command: 'stepBack';1023arguments: StepBackArguments;1024}10251026/** Arguments for `stepBack` request. */1027interface StepBackArguments {1028/** Specifies the thread for which to resume execution for one step backwards (of the given granularity). */1029threadId: number;1030/** If this flag is true, all other suspended threads are not resumed. */1031singleThread?: boolean;1032/** Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed. */1033granularity?: SteppingGranularity;1034}10351036/** Response to `stepBack` request. This is just an acknowledgement, so no body field is required. */1037interface StepBackResponse extends Response {1038}10391040/** ReverseContinue request; value of command field is 'reverseContinue'.1041The 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.1042Clients should only call this request if the corresponding capability `supportsStepBack` is true.1043*/1044interface ReverseContinueRequest extends Request {1045// command: 'reverseContinue';1046arguments: ReverseContinueArguments;1047}10481049/** Arguments for `reverseContinue` request. */1050interface ReverseContinueArguments {1051/** Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed. */1052threadId: number;1053/** If this flag is true, backward execution is resumed only for the thread with given `threadId`. */1054singleThread?: boolean;1055}10561057/** Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required. */1058interface ReverseContinueResponse extends Response {1059}10601061/** RestartFrame request; value of command field is 'restartFrame'.1062The request restarts execution of the specified stack frame.1063The debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.1064Clients should only call this request if the corresponding capability `supportsRestartFrame` is true.1065*/1066interface RestartFrameRequest extends Request {1067// command: 'restartFrame';1068arguments: RestartFrameArguments;1069}10701071/** Arguments for `restartFrame` request. */1072interface RestartFrameArguments {1073/** Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. */1074frameId: number;1075}10761077/** Response to `restartFrame` request. This is just an acknowledgement, so no body field is required. */1078interface RestartFrameResponse extends Response {1079}10801081/** Goto request; value of command field is 'goto'.1082The request sets the location where the debuggee will continue to run.1083This makes it possible to skip the execution of code or to execute code again.1084The code between the current location and the goto target is not executed but skipped.1085The debug adapter first sends the response and then a `stopped` event with reason `goto`.1086Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).1087*/1088interface GotoRequest extends Request {1089// command: 'goto';1090arguments: GotoArguments;1091}10921093/** Arguments for `goto` request. */1094interface GotoArguments {1095/** Set the goto target for this thread. */1096threadId: number;1097/** The location where the debuggee will continue to run. */1098targetId: number;1099}11001101/** Response to `goto` request. This is just an acknowledgement, so no body field is required. */1102interface GotoResponse extends Response {1103}11041105/** Pause request; value of command field is 'pause'.1106The request suspends the debuggee.1107The debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.1108*/1109interface PauseRequest extends Request {1110// command: 'pause';1111arguments: PauseArguments;1112}11131114/** Arguments for `pause` request. */1115interface PauseArguments {1116/** Pause execution for this thread. */1117threadId: number;1118}11191120/** Response to `pause` request. This is just an acknowledgement, so no body field is required. */1121interface PauseResponse extends Response {1122}11231124/** StackTrace request; value of command field is 'stackTrace'.1125The request returns a stacktrace from the current execution state of a given thread.1126A 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.1127*/1128interface StackTraceRequest extends Request {1129// command: 'stackTrace';1130arguments: StackTraceArguments;1131}11321133/** Arguments for `stackTrace` request. */1134interface StackTraceArguments {1135/** Retrieve the stacktrace for this thread. */1136threadId: number;1137/** The index of the first frame to return; if omitted frames start at 0. */1138startFrame?: number;1139/** The maximum number of frames to return. If levels is not specified or 0, all frames are returned. */1140levels?: number;1141/** Specifies details on how to format the stack frames.1142The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.1143*/1144format?: StackFrameFormat;1145}11461147/** Response to `stackTrace` request. */1148interface StackTraceResponse extends Response {1149body: {1150/** The frames of the stack frame. If the array has length zero, there are no stack frames available.1151This means that there is no location information available.1152*/1153stackFrames: StackFrame[];1154/** The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client. */1155totalFrames?: number;1156};1157}11581159/** Scopes request; value of command field is 'scopes'.1160The request returns the variable scopes for a given stack frame ID.1161*/1162interface ScopesRequest extends Request {1163// command: 'scopes';1164arguments: ScopesArguments;1165}11661167/** Arguments for `scopes` request. */1168interface ScopesArguments {1169/** Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. */1170frameId: number;1171}11721173/** Response to `scopes` request. */1174interface ScopesResponse extends Response {1175body: {1176/** The scopes of the stack frame. If the array has length zero, there are no scopes available. */1177scopes: Scope[];1178};1179}11801181/** Variables request; value of command field is 'variables'.1182Retrieves all child variables for the given variable reference.1183A filter can be used to limit the fetched children to either named or indexed children.1184*/1185interface VariablesRequest extends Request {1186// command: 'variables';1187arguments: VariablesArguments;1188}11891190/** Arguments for `variables` request. */1191interface VariablesArguments {1192/** The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. */1193variablesReference: number;1194/** Filter to limit the child variables to either named or indexed. If omitted, both types are fetched. */1195filter?: 'indexed' | 'named';1196/** The index of the first variable to return; if omitted children start at 0.1197The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.1198*/1199start?: number;1200/** The number of variables to return. If count is missing or 0, all variables are returned.1201The attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true.1202*/1203count?: number;1204/** Specifies details on how to format the Variable values.1205The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.1206*/1207format?: ValueFormat;1208}12091210/** Response to `variables` request. */1211interface VariablesResponse extends Response {1212body: {1213/** All (or a range) of variables for the given variable reference. */1214variables: Variable[];1215};1216}12171218/** SetVariable request; value of command field is 'setVariable'.1219Set 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.1220If a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.1221*/1222interface SetVariableRequest extends Request {1223// command: 'setVariable';1224arguments: SetVariableArguments;1225}12261227/** Arguments for `setVariable` request. */1228interface SetVariableArguments {1229/** The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details. */1230variablesReference: number;1231/** The name of the variable in the container. */1232name: string;1233/** The value of the variable. */1234value: string;1235/** Specifies details on how to format the response value. */1236format?: ValueFormat;1237}12381239/** Response to `setVariable` request. */1240interface SetVariableResponse extends Response {1241body: {1242/** The new value of the variable. */1243value: string;1244/** The type of the new value. Typically shown in the UI when hovering over the value. */1245type?: string;1246/** If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details.12471248If this property is included in the response, any `variablesReference` previously associated with the updated variable, and those of its children, are no longer valid.1249*/1250variablesReference?: number;1251/** The number of named child variables.1252The client can use this information to present the variables in a paged UI and fetch them in chunks.1253The value should be less than or equal to 2147483647 (2^31-1).1254*/1255namedVariables?: number;1256/** The number of indexed child variables.1257The client can use this information to present the variables in a paged UI and fetch them in chunks.1258The value should be less than or equal to 2147483647 (2^31-1).1259*/1260indexedVariables?: number;1261/** A memory reference to a location appropriate for this result.1262For pointer type eval results, this is generally a reference to the memory address contained in the pointer.1263This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.1264*/1265memoryReference?: string;1266/** A reference that allows the client to request the location where the new value is declared. For example, if the new value is function pointer, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.12671268This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.1269*/1270valueLocationReference?: number;1271};1272}12731274/** Source request; value of command field is 'source'.1275The request retrieves the source code for a given source reference.1276*/1277interface SourceRequest extends Request {1278// command: 'source';1279arguments: SourceArguments;1280}12811282/** Arguments for `source` request. */1283interface SourceArguments {1284/** Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified. */1285source?: Source;1286/** The reference to the source. This is the same as `source.sourceReference`.1287This is provided for backward compatibility since old clients do not understand the `source` attribute.1288*/1289sourceReference: number;1290}12911292/** Response to `source` request. */1293interface SourceResponse extends Response {1294body: {1295/** Content of the source reference. */1296content: string;1297/** Content type (MIME type) of the source. */1298mimeType?: string;1299};1300}13011302/** Threads request; value of command field is 'threads'.1303The request retrieves a list of all threads.1304*/1305interface ThreadsRequest extends Request {1306// command: 'threads';1307}13081309/** Response to `threads` request. */1310interface ThreadsResponse extends Response {1311body: {1312/** All threads. */1313threads: Thread[];1314};1315}13161317/** TerminateThreads request; value of command field is 'terminateThreads'.1318The request terminates the threads with the given ids.1319Clients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.1320*/1321interface TerminateThreadsRequest extends Request {1322// command: 'terminateThreads';1323arguments: TerminateThreadsArguments;1324}13251326/** Arguments for `terminateThreads` request. */1327interface TerminateThreadsArguments {1328/** Ids of threads to be terminated. */1329threadIds?: number[];1330}13311332/** Response to `terminateThreads` request. This is just an acknowledgement, no body field is required. */1333interface TerminateThreadsResponse extends Response {1334}13351336/** Modules request; value of command field is 'modules'.1337Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.1338Clients should only call this request if the corresponding capability `supportsModulesRequest` is true.1339*/1340interface ModulesRequest extends Request {1341// command: 'modules';1342arguments: ModulesArguments;1343}13441345/** Arguments for `modules` request. */1346interface ModulesArguments {1347/** The index of the first module to return; if omitted modules start at 0. */1348startModule?: number;1349/** The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned. */1350moduleCount?: number;1351}13521353/** Response to `modules` request. */1354interface ModulesResponse extends Response {1355body: {1356/** All modules or range of modules. */1357modules: Module[];1358/** The total number of modules available. */1359totalModules?: number;1360};1361}13621363/** LoadedSources request; value of command field is 'loadedSources'.1364Retrieves the set of all sources currently loaded by the debugged process.1365Clients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.1366*/1367interface LoadedSourcesRequest extends Request {1368// command: 'loadedSources';1369arguments?: LoadedSourcesArguments;1370}13711372/** Arguments for `loadedSources` request. */1373interface LoadedSourcesArguments {1374}13751376/** Response to `loadedSources` request. */1377interface LoadedSourcesResponse extends Response {1378body: {1379/** Set of loaded sources. */1380sources: Source[];1381};1382}13831384/** Evaluate request; value of command field is 'evaluate'.1385Evaluates the given expression in the context of a stack frame.1386The expression has access to any variables and arguments that are in scope.1387*/1388interface EvaluateRequest extends Request {1389// command: 'evaluate';1390arguments: EvaluateArguments;1391}13921393/** Arguments for `evaluate` request. */1394interface EvaluateArguments {1395/** The expression to evaluate. */1396expression: string;1397/** Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. */1398frameId?: number;1399/** The contextual line where the expression should be evaluated. In the 'hover' context, this should be set to the start of the expression being hovered. */1400line?: number;1401/** The contextual column where the expression should be evaluated. This may be provided if `line` is also provided.14021403It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.1404*/1405column?: number;1406/** The contextual source in which the `line` is found. This must be provided if `line` is provided. */1407source?: Source;1408/** The context in which the evaluate request is used.1409Values:1410'watch': evaluate is called from a watch view context.1411'repl': evaluate is called from a REPL context.1412'hover': evaluate is called to generate the debug hover contents.1413This value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.1414'clipboard': evaluate is called to generate clipboard contents.1415This value should only be used if the corresponding capability `supportsClipboardContext` is true.1416'variables': evaluate is called from a variables view context.1417etc.1418*/1419context?: 'watch' | 'repl' | 'hover' | 'clipboard' | 'variables' | string;1420/** Specifies details on how to format the result.1421The attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true.1422*/1423format?: ValueFormat;1424}14251426/** Response to `evaluate` request. */1427interface EvaluateResponse extends Response {1428body: {1429/** The result of the evaluate request. */1430result: string;1431/** The type of the evaluate result.1432This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.1433*/1434type?: string;1435/** Properties of an evaluate result that can be used to determine how to render the result in the UI. */1436presentationHint?: VariablePresentationHint;1437/** If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. */1438variablesReference: number;1439/** The number of named child variables.1440The client can use this information to present the variables in a paged UI and fetch them in chunks.1441The value should be less than or equal to 2147483647 (2^31-1).1442*/1443namedVariables?: number;1444/** The number of indexed child variables.1445The client can use this information to present the variables in a paged UI and fetch them in chunks.1446The value should be less than or equal to 2147483647 (2^31-1).1447*/1448indexedVariables?: number;1449/** A memory reference to a location appropriate for this result.1450For pointer type eval results, this is generally a reference to the memory address contained in the pointer.1451This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.1452*/1453memoryReference?: string;1454/** A reference that allows the client to request the location where the returned value is declared. For example, if a function pointer is returned, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.14551456This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.1457*/1458valueLocationReference?: number;1459};1460}14611462/** SetExpression request; value of command field is 'setExpression'.1463Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.1464The expressions have access to any variables and arguments that are in scope of the specified frame.1465Clients should only call this request if the corresponding capability `supportsSetExpression` is true.1466If a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.1467*/1468interface SetExpressionRequest extends Request {1469// command: 'setExpression';1470arguments: SetExpressionArguments;1471}14721473/** Arguments for `setExpression` request. */1474interface SetExpressionArguments {1475/** The l-value expression to assign to. */1476expression: string;1477/** The value expression to assign to the l-value expression. */1478value: string;1479/** Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope. */1480frameId?: number;1481/** Specifies how the resulting value should be formatted. */1482format?: ValueFormat;1483}14841485/** Response to `setExpression` request. */1486interface SetExpressionResponse extends Response {1487body: {1488/** The new value of the expression. */1489value: string;1490/** The type of the value.1491This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.1492*/1493type?: string;1494/** Properties of a value that can be used to determine how to render the result in the UI. */1495presentationHint?: VariablePresentationHint;1496/** If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. */1497variablesReference?: number;1498/** The number of named child variables.1499The client can use this information to present the variables in a paged UI and fetch them in chunks.1500The value should be less than or equal to 2147483647 (2^31-1).1501*/1502namedVariables?: number;1503/** The number of indexed child variables.1504The client can use this information to present the variables in a paged UI and fetch them in chunks.1505The value should be less than or equal to 2147483647 (2^31-1).1506*/1507indexedVariables?: number;1508/** A memory reference to a location appropriate for this result.1509For pointer type eval results, this is generally a reference to the memory address contained in the pointer.1510This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.1511*/1512memoryReference?: string;1513/** A reference that allows the client to request the location where the new value is declared. For example, if the new value is function pointer, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.15141515This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.1516*/1517valueLocationReference?: number;1518};1519}15201521/** StepInTargets request; value of command field is 'stepInTargets'.1522This request retrieves the possible step-in targets for the specified stack frame.1523These targets can be used in the `stepIn` request.1524Clients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.1525*/1526interface StepInTargetsRequest extends Request {1527// command: 'stepInTargets';1528arguments: StepInTargetsArguments;1529}15301531/** Arguments for `stepInTargets` request. */1532interface StepInTargetsArguments {1533/** The stack frame for which to retrieve the possible step-in targets. */1534frameId: number;1535}15361537/** Response to `stepInTargets` request. */1538interface StepInTargetsResponse extends Response {1539body: {1540/** The possible step-in targets of the specified source location. */1541targets: StepInTarget[];1542};1543}15441545/** GotoTargets request; value of command field is 'gotoTargets'.1546This request retrieves the possible goto targets for the specified source location.1547These targets can be used in the `goto` request.1548Clients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.1549*/1550interface GotoTargetsRequest extends Request {1551// command: 'gotoTargets';1552arguments: GotoTargetsArguments;1553}15541555/** Arguments for `gotoTargets` request. */1556interface GotoTargetsArguments {1557/** The source location for which the goto targets are determined. */1558source: Source;1559/** The line location for which the goto targets are determined. */1560line: number;1561/** The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */1562column?: number;1563}15641565/** Response to `gotoTargets` request. */1566interface GotoTargetsResponse extends Response {1567body: {1568/** The possible goto targets of the specified location. */1569targets: GotoTarget[];1570};1571}15721573/** Completions request; value of command field is 'completions'.1574Returns a list of possible completions for a given caret position and text.1575Clients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.1576*/1577interface CompletionsRequest extends Request {1578// command: 'completions';1579arguments: CompletionsArguments;1580}15811582/** Arguments for `completions` request. */1583interface CompletionsArguments {1584/** Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope. */1585frameId?: number;1586/** One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion. */1587text: string;1588/** The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */1589column: number;1590/** A line for which to determine the completion proposals. If missing the first line of the text is assumed. */1591line?: number;1592}15931594/** Response to `completions` request. */1595interface CompletionsResponse extends Response {1596body: {1597/** The possible completions for . */1598targets: CompletionItem[];1599};1600}16011602/** ExceptionInfo request; value of command field is 'exceptionInfo'.1603Retrieves the details of the exception that caused this event to be raised.1604Clients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.1605*/1606interface ExceptionInfoRequest extends Request {1607// command: 'exceptionInfo';1608arguments: ExceptionInfoArguments;1609}16101611/** Arguments for `exceptionInfo` request. */1612interface ExceptionInfoArguments {1613/** Thread for which exception information should be retrieved. */1614threadId: number;1615}16161617/** Response to `exceptionInfo` request. */1618interface ExceptionInfoResponse extends Response {1619body: {1620/** ID of the exception that was thrown. */1621exceptionId: string;1622/** Descriptive text for the exception. */1623description?: string;1624/** Mode that caused the exception notification to be raised. */1625breakMode: ExceptionBreakMode;1626/** Detailed information about the exception. */1627details?: ExceptionDetails;1628};1629}16301631/** ReadMemory request; value of command field is 'readMemory'.1632Reads bytes from memory at the provided location.1633Clients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.1634*/1635interface ReadMemoryRequest extends Request {1636// command: 'readMemory';1637arguments: ReadMemoryArguments;1638}16391640/** Arguments for `readMemory` request. */1641interface ReadMemoryArguments {1642/** Memory reference to the base location from which data should be read. */1643memoryReference: string;1644/** Offset (in bytes) to be applied to the reference location before reading data. Can be negative. */1645offset?: number;1646/** Number of bytes to read at the specified location and offset. */1647count: number;1648}16491650/** Response to `readMemory` request. */1651interface ReadMemoryResponse extends Response {1652body?: {1653/** The address of the first byte of data returned.1654Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise.1655*/1656address: string;1657/** The number of unreadable bytes encountered after the last successfully read byte.1658This can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds.1659*/1660unreadableBytes?: number;1661/** The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory. */1662data?: string;1663};1664}16651666/** WriteMemory request; value of command field is 'writeMemory'.1667Writes bytes to memory at the provided location.1668Clients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.1669*/1670interface WriteMemoryRequest extends Request {1671// command: 'writeMemory';1672arguments: WriteMemoryArguments;1673}16741675/** Arguments for `writeMemory` request. */1676interface WriteMemoryArguments {1677/** Memory reference to the base location to which data should be written. */1678memoryReference: string;1679/** Offset (in bytes) to be applied to the reference location before writing data. Can be negative. */1680offset?: number;1681/** Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.1682If false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not.1683*/1684allowPartial?: boolean;1685/** Bytes to write, encoded using base64. */1686data: string;1687}16881689/** Response to `writeMemory` request. */1690interface WriteMemoryResponse extends Response {1691body?: {1692/** Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative. */1693offset?: number;1694/** Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written. */1695bytesWritten?: number;1696};1697}16981699/** Disassemble request; value of command field is 'disassemble'.1700Disassembles code stored at the provided location.1701Clients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.1702*/1703interface DisassembleRequest extends Request {1704// command: 'disassemble';1705arguments: DisassembleArguments;1706}17071708/** Arguments for `disassemble` request. */1709interface DisassembleArguments {1710/** Memory reference to the base location containing the instructions to disassemble. */1711memoryReference: string;1712/** Offset (in bytes) to be applied to the reference location before disassembling. Can be negative. */1713offset?: number;1714/** Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. */1715instructionOffset?: number;1716/** Number of instructions to disassemble starting at the specified location and offset.1717An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value.1718*/1719instructionCount: number;1720/** If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. */1721resolveSymbols?: boolean;1722}17231724/** Response to `disassemble` request. */1725interface DisassembleResponse extends Response {1726body?: {1727/** The list of disassembled instructions. */1728instructions: DisassembledInstruction[];1729};1730}17311732/** Locations request; value of command field is 'locations'.1733Looks up information about a location reference previously returned by the debug adapter.1734*/1735interface LocationsRequest extends Request {1736// command: 'locations';1737arguments: LocationsArguments;1738}17391740/** Arguments for `locations` request. */1741interface LocationsArguments {1742/** Location reference to resolve. */1743locationReference: number;1744}17451746/** Response to `locations` request. */1747interface LocationsResponse extends Response {1748body?: {1749/** The source containing the location; either `source.path` or `source.sourceReference` must be specified. */1750source: Source;1751/** The line number of the location. The client capability `linesStartAt1` determines whether it is 0- or 1-based. */1752line: number;1753/** Position of the location within the `line`. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed. */1754column?: number;1755/** End line of the location, present if the location refers to a range. The client capability `linesStartAt1` determines whether it is 0- or 1-based. */1756endLine?: number;1757/** End position of the location within `endLine`, present if the location refers to a range. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */1758endColumn?: number;1759};1760}17611762/** Information about the capabilities of a debug adapter. */1763interface Capabilities {1764/** The debug adapter supports the `configurationDone` request. */1765supportsConfigurationDoneRequest?: boolean;1766/** The debug adapter supports function breakpoints. */1767supportsFunctionBreakpoints?: boolean;1768/** The debug adapter supports conditional breakpoints. */1769supportsConditionalBreakpoints?: boolean;1770/** The debug adapter supports breakpoints that break execution after a specified number of hits. */1771supportsHitConditionalBreakpoints?: boolean;1772/** The debug adapter supports a (side effect free) `evaluate` request for data hovers. */1773supportsEvaluateForHovers?: boolean;1774/** Available exception filter options for the `setExceptionBreakpoints` request. */1775exceptionBreakpointFilters?: ExceptionBreakpointsFilter[];1776/** The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests. */1777supportsStepBack?: boolean;1778/** The debug adapter supports setting a variable to a value. */1779supportsSetVariable?: boolean;1780/** The debug adapter supports restarting a frame. */1781supportsRestartFrame?: boolean;1782/** The debug adapter supports the `gotoTargets` request. */1783supportsGotoTargetsRequest?: boolean;1784/** The debug adapter supports the `stepInTargets` request. */1785supportsStepInTargetsRequest?: boolean;1786/** The debug adapter supports the `completions` request. */1787supportsCompletionsRequest?: boolean;1788/** The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character. */1789completionTriggerCharacters?: string[];1790/** The debug adapter supports the `modules` request. */1791supportsModulesRequest?: boolean;1792/** The set of additional module information exposed by the debug adapter. */1793additionalModuleColumns?: ColumnDescriptor[];1794/** Checksum algorithms supported by the debug adapter. */1795supportedChecksumAlgorithms?: ChecksumAlgorithm[];1796/** The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request. */1797supportsRestartRequest?: boolean;1798/** The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request. */1799supportsExceptionOptions?: boolean;1800/** The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests. */1801supportsValueFormattingOptions?: boolean;1802/** The debug adapter supports the `exceptionInfo` request. */1803supportsExceptionInfoRequest?: boolean;1804/** The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request. */1805supportTerminateDebuggee?: boolean;1806/** The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request. */1807supportSuspendDebuggee?: boolean;1808/** The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported. */1809supportsDelayedStackTraceLoading?: boolean;1810/** The debug adapter supports the `loadedSources` request. */1811supportsLoadedSourcesRequest?: boolean;1812/** The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`. */1813supportsLogPoints?: boolean;1814/** The debug adapter supports the `terminateThreads` request. */1815supportsTerminateThreadsRequest?: boolean;1816/** The debug adapter supports the `setExpression` request. */1817supportsSetExpression?: boolean;1818/** The debug adapter supports the `terminate` request. */1819supportsTerminateRequest?: boolean;1820/** The debug adapter supports data breakpoints. */1821supportsDataBreakpoints?: boolean;1822/** The debug adapter supports the `readMemory` request. */1823supportsReadMemoryRequest?: boolean;1824/** The debug adapter supports the `writeMemory` request. */1825supportsWriteMemoryRequest?: boolean;1826/** The debug adapter supports the `disassemble` request. */1827supportsDisassembleRequest?: boolean;1828/** The debug adapter supports the `cancel` request. */1829supportsCancelRequest?: boolean;1830/** The debug adapter supports the `breakpointLocations` request. */1831supportsBreakpointLocationsRequest?: boolean;1832/** The debug adapter supports the `clipboard` context value in the `evaluate` request. */1833supportsClipboardContext?: boolean;1834/** The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests. */1835supportsSteppingGranularity?: boolean;1836/** The debug adapter supports adding breakpoints based on instruction references. */1837supportsInstructionBreakpoints?: boolean;1838/** The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request. */1839supportsExceptionFilterOptions?: boolean;1840/** The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`). */1841supportsSingleThreadExecutionRequests?: boolean;1842/** The debug adapter supports the `asAddress` and `bytes` fields in the `dataBreakpointInfo` request. */1843supportsDataBreakpointBytes?: boolean;1844/** Modes of breakpoints supported by the debug adapter, such as 'hardware' or 'software'. If present, the client may allow the user to select a mode and include it in its `setBreakpoints` request.18451846Clients may present the first applicable mode in this array as the 'default' mode in gestures that set breakpoints.1847*/1848breakpointModes?: BreakpointMode[];1849/** The debug adapter supports ANSI escape sequences in styling of `OutputEvent.output` and `Variable.value` fields. */1850supportsANSIStyling?: boolean;1851}18521853/** An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with. */1854interface ExceptionBreakpointsFilter {1855/** The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request. */1856filter: string;1857/** The name of the filter option. This is shown in the UI. */1858label: string;1859/** A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated. */1860description?: string;1861/** Initial value of the filter option. If not specified a value false is assumed. */1862default?: boolean;1863/** Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. */1864supportsCondition?: boolean;1865/** A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated. */1866conditionDescription?: string;1867}18681869/** A structured message object. Used to return errors from requests. */1870interface Message {1871/** Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily. */1872id: number;1873/** A format string for the message. Embedded variables have the form `{name}`.1874If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.1875*/1876format: string;1877/** An object used as a dictionary for looking up the variables in the format string. */1878variables?: { [key: string]: string; };1879/** If true send to telemetry. */1880sendTelemetry?: boolean;1881/** If true show user. */1882showUser?: boolean;1883/** A url where additional information about this message can be found. */1884url?: string;1885/** A label that is presented to the user as the UI for opening the url. */1886urlLabel?: string;1887}18881889/** A Module object represents a row in the modules view.1890The `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.1891The `name` attribute is used to minimally render the module in the UI.18921893Additional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.18941895To 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.1896*/1897interface Module {1898/** Unique identifier for the module. */1899id: number | string;1900/** A name of the module. */1901name: string;1902/** Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module. */1903path?: string;1904/** True if the module is optimized. */1905isOptimized?: boolean;1906/** True if the module is considered 'user code' by a debugger that supports 'Just My Code'. */1907isUserCode?: boolean;1908/** Version of Module. */1909version?: string;1910/** User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.) */1911symbolStatus?: string;1912/** Logical full path to the symbol file. The exact definition is implementation defined. */1913symbolFilePath?: string;1914/** Module created or modified, encoded as a RFC 3339 timestamp. */1915dateTimeStamp?: string;1916/** Address range covered by this module. */1917addressRange?: string;1918}19191920/** A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,1921and what the column's label should be.1922It is only used if the underlying UI actually supports this level of customization.1923*/1924interface ColumnDescriptor {1925/** Name of the attribute rendered in this column. */1926attributeName: string;1927/** Header UI label of column. */1928label: string;1929/** Format to use for the rendered values in this column. TBD how the format strings looks like. */1930format?: string;1931/** Datatype of values in this column. Defaults to `string` if not specified. */1932type?: 'string' | 'number' | 'boolean' | 'unixTimestampUTC';1933/** Width of this column in characters (hint only). */1934width?: number;1935}19361937/** A Thread */1938interface Thread {1939/** Unique identifier for the thread. */1940id: number;1941/** The name of the thread. */1942name: string;1943}19441945/** A `Source` is a descriptor for source code.1946It is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.1947*/1948interface Source {1949/** The short name of the source. Every source returned from the debug adapter has a name.1950When sending a source to the debug adapter this name is optional.1951*/1952name?: string;1953/** The path of the source to be shown in the UI.1954It is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0).1955*/1956path?: string;1957/** If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).1958Since a `sourceReference` is only valid for a session, it can not be used to persist a source.1959The value should be less than or equal to 2147483647 (2^31-1).1960*/1961sourceReference?: number;1962/** A hint for how to present the source in the UI.1963A value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.1964*/1965presentationHint?: 'normal' | 'emphasize' | 'deemphasize';1966/** The origin of this source. For example, 'internal module', 'inlined content from source map', etc. */1967origin?: string;1968/** A list of sources that are related to this source. These may be the source that generated this source. */1969sources?: Source[];1970/** Additional data that a debug adapter might want to loop through the client.1971The client should leave the data intact and persist it across sessions. The client should not interpret the data.1972*/1973adapterData?: any;1974/** The checksums associated with this file. */1975checksums?: Checksum[];1976}19771978/** A Stackframe contains the source location. */1979interface StackFrame {1980/** An identifier for the stack frame. It must be unique across all threads.1981This id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame.1982*/1983id: number;1984/** The name of the stack frame, typically a method name. */1985name: string;1986/** The source of the frame. */1987source?: Source;1988/** The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client. */1989line: number;1990/** Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client. */1991column: number;1992/** The end line of the range covered by the stack frame. */1993endLine?: number;1994/** End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */1995endColumn?: number;1996/** Indicates whether this frame can be restarted with the `restartFrame` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartFrame` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent. */1997canRestart?: boolean;1998/** A memory reference for the current instruction pointer in this frame. */1999instructionPointerReference?: string;2000/** The module associated with this frame, if any. */2001moduleId?: number | string;2002/** A hint for how to present this frame in the UI.2003A value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way.2004*/2005presentationHint?: 'normal' | 'label' | 'subtle';2006}20072008/** A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source. */2009interface Scope {2010/** Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated. */2011name: string;2012/** A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.2013Values:2014'arguments': Scope contains method arguments.2015'locals': Scope contains local variables.2016'registers': Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request.2017'returnValue': Scope contains one or more return values.2018etc.2019*/2020presentationHint?: 'arguments' | 'locals' | 'registers' | 'returnValue' | string;2021/** The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. */2022variablesReference: number;2023/** The number of named variables in this scope.2024The client can use this information to present the variables in a paged UI and fetch them in chunks.2025*/2026namedVariables?: number;2027/** The number of indexed variables in this scope.2028The client can use this information to present the variables in a paged UI and fetch them in chunks.2029*/2030indexedVariables?: number;2031/** If true, the number of variables in this scope is large or expensive to retrieve. */2032expensive: boolean;2033/** The source for this scope. */2034source?: Source;2035/** The start line of the range covered by this scope. */2036line?: number;2037/** Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2038column?: number;2039/** The end line of the range covered by this scope. */2040endLine?: number;2041/** End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2042endColumn?: number;2043}20442045/** A Variable is a name/value pair.2046The `type` attribute is shown if space permits or when hovering over the variable's name.2047The `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.2048If the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.2049If the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.2050The client can use this information to present the children in a paged UI and fetch them in chunks.2051*/2052interface Variable {2053/** The variable's name. */2054name: string;2055/** The variable's value.2056This can be a multi-line text, e.g. for a function the body of a function.2057For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.2058An empty string can be used if no value should be shown in the UI.2059*/2060value: string;2061/** The type of the variable's value. Typically shown in the UI when hovering over the value.2062This attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true.2063*/2064type?: string;2065/** Properties of a variable that can be used to determine how to render the variable in the UI. */2066presentationHint?: VariablePresentationHint;2067/** The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value. */2068evaluateName?: string;2069/** If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details. */2070variablesReference: number;2071/** The number of named child variables.2072The client can use this information to present the children in a paged UI and fetch them in chunks.2073*/2074namedVariables?: number;2075/** The number of indexed child variables.2076The client can use this information to present the children in a paged UI and fetch them in chunks.2077*/2078indexedVariables?: number;2079/** A memory reference associated with this variable.2080For pointer type variables, this is generally a reference to the memory address contained in the pointer.2081For executable data, this reference may later be used in a `disassemble` request.2082This attribute may be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true.2083*/2084memoryReference?: string;2085/** A reference that allows the client to request the location where the variable is declared. This should be present only if the adapter is likely to be able to resolve the location.20862087This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.2088*/2089declarationLocationReference?: number;2090/** A reference that allows the client to request the location where the variable's value is declared. For example, if the variable contains a function pointer, the adapter may be able to look up the function's location. This should be present only if the adapter is likely to be able to resolve the location.20912092This reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details.2093*/2094valueLocationReference?: number;2095}20962097/** Properties of a variable that can be used to determine how to render the variable in the UI. */2098interface VariablePresentationHint {2099/** The kind of variable. Before introducing additional values, try to use the listed values.2100Values:2101'property': Indicates that the object is a property.2102'method': Indicates that the object is a method.2103'class': Indicates that the object is a class.2104'data': Indicates that the object is data.2105'event': Indicates that the object is an event.2106'baseClass': Indicates that the object is a base class.2107'innerClass': Indicates that the object is an inner class.2108'interface': Indicates that the object is an interface.2109'mostDerivedClass': Indicates that the object is the most derived class.2110'virtual': Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.2111'dataBreakpoint': Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead.2112etc.2113*/2114kind?: 'property' | 'method' | 'class' | 'data' | 'event' | 'baseClass' | 'innerClass' | 'interface' | 'mostDerivedClass' | 'virtual' | 'dataBreakpoint' | string;2115/** Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.2116Values:2117'static': Indicates that the object is static.2118'constant': Indicates that the object is a constant.2119'readOnly': Indicates that the object is read only.2120'rawString': Indicates that the object is a raw string.2121'hasObjectId': Indicates that the object can have an Object ID created for it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.2122'canHaveObjectId': Indicates that the object has an Object ID associated with it. This is a vestigial attribute that is used by some clients; 'Object ID's are not specified in the protocol.2123'hasSideEffects': Indicates that the evaluation had side effects.2124'hasDataBreakpoint': Indicates that the object has its value tracked by a data breakpoint.2125etc.2126*/2127attributes?: ('static' | 'constant' | 'readOnly' | 'rawString' | 'hasObjectId' | 'canHaveObjectId' | 'hasSideEffects' | 'hasDataBreakpoint' | string)[];2128/** Visibility of variable. Before introducing additional values, try to use the listed values.2129Values: 'public', 'private', 'protected', 'internal', 'final', etc.2130*/2131visibility?: 'public' | 'private' | 'protected' | 'internal' | 'final' | string;2132/** If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.2133This mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.2134Please note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.2135*/2136lazy?: boolean;2137}21382139/** Properties of a breakpoint location returned from the `breakpointLocations` request. */2140interface BreakpointLocation {2141/** Start line of breakpoint location. */2142line: number;2143/** The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2144column?: number;2145/** The end line of breakpoint location if the location covers a range. */2146endLine?: number;2147/** The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2148endColumn?: number;2149}21502151/** Properties of a breakpoint or logpoint passed to the `setBreakpoints` request. */2152interface SourceBreakpoint {2153/** The source line of the breakpoint or logpoint. */2154line: number;2155/** Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2156column?: number;2157/** The expression for conditional breakpoints.2158It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.2159*/2160condition?: string;2161/** The expression that controls how many hits of the breakpoint are ignored.2162The debug adapter is expected to interpret the expression as needed.2163The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.2164If both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met.2165*/2166hitCondition?: string;2167/** If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)2168but log the message instead. Expressions within `{}` are interpolated.2169The attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.2170If either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met.2171*/2172logMessage?: string;2173/** The mode of this breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`. */2174mode?: string;2175}21762177/** Properties of a breakpoint passed to the `setFunctionBreakpoints` request. */2178interface FunctionBreakpoint {2179/** The name of the function. */2180name: string;2181/** An expression for conditional breakpoints.2182It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.2183*/2184condition?: string;2185/** An expression that controls how many hits of the breakpoint are ignored.2186The debug adapter is expected to interpret the expression as needed.2187The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.2188*/2189hitCondition?: string;2190}21912192/** This enumeration defines all possible access types for data breakpoints. */2193type DataBreakpointAccessType = 'read' | 'write' | 'readWrite';21942195/** Properties of a data breakpoint passed to the `setDataBreakpoints` request. */2196interface DataBreakpoint {2197/** An id representing the data. This id is returned from the `dataBreakpointInfo` request. */2198dataId: string;2199/** The access type of the data. */2200accessType?: DataBreakpointAccessType;2201/** An expression for conditional breakpoints. */2202condition?: string;2203/** An expression that controls how many hits of the breakpoint are ignored.2204The debug adapter is expected to interpret the expression as needed.2205*/2206hitCondition?: string;2207}22082209/** Properties of a breakpoint passed to the `setInstructionBreakpoints` request */2210interface InstructionBreakpoint {2211/** The instruction reference of the breakpoint.2212This should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`.2213*/2214instructionReference: string;2215/** The offset from the instruction reference in bytes.2216This can be negative.2217*/2218offset?: number;2219/** An expression for conditional breakpoints.2220It is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true.2221*/2222condition?: string;2223/** An expression that controls how many hits of the breakpoint are ignored.2224The debug adapter is expected to interpret the expression as needed.2225The attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.2226*/2227hitCondition?: string;2228/** The mode of this breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`. */2229mode?: string;2230}22312232/** Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests. */2233interface Breakpoint {2234/** The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. */2235id?: number;2236/** If true, the breakpoint could be set (but not necessarily at the desired location). */2237verified: boolean;2238/** A message about the state of the breakpoint.2239This is shown to the user and can be used to explain why a breakpoint could not be verified.2240*/2241message?: string;2242/** The source where the breakpoint is located. */2243source?: Source;2244/** The start line of the actual range covered by the breakpoint. */2245line?: number;2246/** Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2247column?: number;2248/** The end line of the actual range covered by the breakpoint. */2249endLine?: number;2250/** End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.2251If no end line is given, then the end column is assumed to be in the start line.2252*/2253endColumn?: number;2254/** A memory reference to where the breakpoint is set. */2255instructionReference?: string;2256/** The offset from the instruction reference.2257This can be negative.2258*/2259offset?: number;2260/** A machine-readable explanation of why a breakpoint may not be verified. If a breakpoint is verified or a specific reason is not known, the adapter should omit this property. Possible values include:22612262- `pending`: Indicates a breakpoint might be verified in the future, but the adapter cannot verify it in the current state.2263- `failed`: Indicates a breakpoint was not able to be verified, and the adapter does not believe it can be verified without intervention.2264*/2265reason?: 'pending' | 'failed';2266}22672268/** The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.2269'statement': The step should allow the program to run until the current statement has finished executing.2270The meaning of a statement is determined by the adapter and it may be considered equivalent to a line.2271For example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.2272'line': The step should allow the program to run until the current source line has executed.2273'instruction': The step should allow one instruction to execute (e.g. one x86 instruction).2274*/2275type SteppingGranularity = 'statement' | 'line' | 'instruction';22762277/** A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step. */2278interface StepInTarget {2279/** Unique identifier for a step-in target. */2280id: number;2281/** The name of the step-in target (shown in the UI). */2282label: string;2283/** The line of the step-in target. */2284line?: number;2285/** Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2286column?: number;2287/** The end line of the range covered by the step-in target. */2288endLine?: number;2289/** End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. */2290endColumn?: number;2291}22922293/** A `GotoTarget` describes a code location that can be used as a target in the `goto` request.2294The possible goto targets can be determined via the `gotoTargets` request.2295*/2296interface GotoTarget {2297/** Unique identifier for a goto target. This is used in the `goto` request. */2298id: number;2299/** The name of the goto target (shown in the UI). */2300label: string;2301/** The line of the goto target. */2302line: number;2303/** The column of the goto target. */2304column?: number;2305/** The end line of the range covered by the goto target. */2306endLine?: number;2307/** The end column of the range covered by the goto target. */2308endColumn?: number;2309/** A memory reference for the instruction pointer value represented by this target. */2310instructionPointerReference?: string;2311}23122313/** `CompletionItems` are the suggestions returned from the `completions` request. */2314interface CompletionItem {2315/** The label of this completion item. By default this is also the text that is inserted when selecting this completion. */2316label: string;2317/** If text is returned and not an empty string, then it is inserted instead of the label. */2318text?: string;2319/** A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead. */2320sortText?: string;2321/** A human-readable string with additional information about this item, like type or symbol information. */2322detail?: string;2323/** The item's type. Typically the client uses this information to render the item in the UI with an icon. */2324type?: CompletionItemType;2325/** Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request. */2326start?: number;2327/** Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted. */2328length?: number;2329/** Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text. */2330selectionStart?: number;2331/** Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0. */2332selectionLength?: number;2333}23342335/** Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them. */2336type CompletionItemType = 'method' | 'function' | 'constructor' | 'field' | 'variable' | 'class' | 'interface' | 'module' | 'property' | 'unit' | 'value' | 'enum' | 'keyword' | 'snippet' | 'text' | 'color' | 'file' | 'reference' | 'customcolor';23372338/** Names of checksum algorithms that may be supported by a debug adapter. */2339type ChecksumAlgorithm = 'MD5' | 'SHA1' | 'SHA256' | 'timestamp';23402341/** The checksum of an item calculated by the specified algorithm. */2342interface Checksum {2343/** The algorithm used to calculate this checksum. */2344algorithm: ChecksumAlgorithm;2345/** Value of the checksum, encoded as a hexadecimal value. */2346checksum: string;2347}23482349/** Provides formatting information for a value. */2350interface ValueFormat {2351/** Display the value in hex. */2352hex?: boolean;2353}23542355/** Provides formatting information for a stack frame. */2356interface StackFrameFormat extends ValueFormat {2357/** Displays parameters for the stack frame. */2358parameters?: boolean;2359/** Displays the types of parameters for the stack frame. */2360parameterTypes?: boolean;2361/** Displays the names of parameters for the stack frame. */2362parameterNames?: boolean;2363/** Displays the values of parameters for the stack frame. */2364parameterValues?: boolean;2365/** Displays the line number of the stack frame. */2366line?: boolean;2367/** Displays the module of the stack frame. */2368module?: boolean;2369/** Includes all stack frames, including those the debug adapter might otherwise hide. */2370includeAll?: boolean;2371}23722373/** An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request. */2374interface ExceptionFilterOptions {2375/** ID of an exception filter returned by the `exceptionBreakpointFilters` capability. */2376filterId: string;2377/** An expression for conditional exceptions.2378The exception breaks into the debugger if the result of the condition is true.2379*/2380condition?: string;2381/** The mode of this exception breakpoint. If defined, this must be one of the `breakpointModes` the debug adapter advertised in its `Capabilities`. */2382mode?: string;2383}23842385/** An `ExceptionOptions` assigns configuration options to a set of exceptions. */2386interface ExceptionOptions {2387/** A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.2388By convention the first segment of the path is a category that is used to group exceptions in the UI.2389*/2390path?: ExceptionPathSegment[];2391/** Condition when a thrown exception should result in a break. */2392breakMode: ExceptionBreakMode;2393}23942395/** This enumeration defines all possible conditions when a thrown exception should result in a break.2396never: never breaks,2397always: always breaks,2398unhandled: breaks when exception unhandled,2399userUnhandled: breaks if the exception is not handled by user code.2400*/2401type ExceptionBreakMode = 'never' | 'always' | 'unhandled' | 'userUnhandled';24022403/** An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.2404If 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.2405*/2406interface ExceptionPathSegment {2407/** If false or missing this segment matches the names provided, otherwise it matches anything except the names provided. */2408negate?: boolean;2409/** Depending on the value of `negate` the names that should match or not match. */2410names: string[];2411}24122413/** Detailed information about an exception that has occurred. */2414interface ExceptionDetails {2415/** Message contained in the exception. */2416message?: string;2417/** Short type name of the exception object. */2418typeName?: string;2419/** Fully-qualified type name of the exception object. */2420fullTypeName?: string;2421/** An expression that can be evaluated in the current scope to obtain the exception object. */2422evaluateName?: string;2423/** Stack trace at the time the exception was thrown. */2424stackTrace?: string;2425/** Details of the exception contained by this exception, if any. */2426innerException?: ExceptionDetails[];2427}24282429/** Represents a single disassembled instruction. */2430interface DisassembledInstruction {2431/** The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise. */2432address: string;2433/** Raw bytes representing the instruction and its operands, in an implementation-defined format. */2434instructionBytes?: string;2435/** Text representing the instruction and its operands, in an implementation-defined format. */2436instruction: string;2437/** Name of the symbol that corresponds with the location of this instruction, if any. */2438symbol?: string;2439/** Source location that corresponds to this instruction, if any.2440Should always be set (if available) on the first instruction returned,2441but can be omitted afterwards if this instruction maps to the same source file as the previous instruction.2442*/2443location?: Source;2444/** The line within the source location that corresponds to this instruction, if any. */2445line?: number;2446/** The column within the line that corresponds to this instruction, if any. */2447column?: number;2448/** The end line of the range that corresponds to this instruction, if any. */2449endLine?: number;2450/** The end column of the range that corresponds to this instruction, if any. */2451endColumn?: number;2452/** A hint for how to present the instruction in the UI.24532454A value of `invalid` may be used to indicate this instruction is 'filler' and cannot be reached by the program. For example, unreadable memory addresses may be presented is 'invalid.'2455*/2456presentationHint?: 'normal' | 'invalid';2457}24582459/** Logical areas that can be invalidated by the `invalidated` event.2460Values:2461'all': All previously fetched data has become invalid and needs to be refetched.2462'stacks': Previously fetched stack related data has become invalid and needs to be refetched.2463'threads': Previously fetched thread related data has become invalid and needs to be refetched.2464'variables': Previously fetched variable data has become invalid and needs to be refetched.2465etc.2466*/2467type InvalidatedAreas = 'all' | 'stacks' | 'threads' | 'variables' | string;24682469/** A `BreakpointMode` is provided as a option when setting breakpoints on sources or instructions. */2470interface BreakpointMode {2471/** The internal ID of the mode. This value is passed to the `setBreakpoints` request. */2472mode: string;2473/** The name of the breakpoint mode. This is shown in the UI. */2474label: string;2475/** A help text providing additional information about the breakpoint mode. This string is typically shown as a hover and can be translated. */2476description?: string;2477/** Describes one or more type of breakpoint this mode applies to. */2478appliesTo: BreakpointModeApplicability[];2479}24802481/** 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.2482Values:2483'source': In `SourceBreakpoint`s2484'exception': In exception breakpoints applied in the `ExceptionFilterOptions`2485'data': In data breakpoints requested in the `DataBreakpointInfo` request2486'instruction': In `InstructionBreakpoint`s2487etc.2488*/2489type BreakpointModeApplicability = 'source' | 'exception' | 'data' | 'instruction' | string;2490}2491249224932494