@debugmcp/mcp-debugger
Version:
Run-time step-through debugging for LLM agents.
1,192 lines (1,157 loc) • 182 kB
JSON
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Debug Adapter Protocol",
"description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.",
"type": "object",
"definitions": {
"ProtocolMessage": {
"type": "object",
"title": "Base Protocol",
"description": "Base class of requests, responses, and events.",
"properties": {
"seq": {
"type": "integer",
"description": "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."
},
"type": {
"type": "string",
"description": "Message type.",
"_enum": [ "request", "response", "event" ]
}
},
"required": [ "seq", "type" ]
},
"Request": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "A client or debug adapter initiated request.",
"properties": {
"type": {
"type": "string",
"enum": [ "request" ]
},
"command": {
"type": "string",
"description": "The command to execute."
},
"arguments": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Object containing arguments for the command."
}
},
"required": [ "type", "command" ]
}]
},
"Event": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "A debug adapter initiated event.",
"properties": {
"type": {
"type": "string",
"enum": [ "event" ]
},
"event": {
"type": "string",
"description": "Type of event."
},
"body": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Event-specific information."
}
},
"required": [ "type", "event" ]
}]
},
"Response": {
"allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, {
"type": "object",
"description": "Response for a request.",
"properties": {
"type": {
"type": "string",
"enum": [ "response" ]
},
"request_seq": {
"type": "integer",
"description": "Sequence number of the corresponding request."
},
"success": {
"type": "boolean",
"description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)."
},
"command": {
"type": "string",
"description": "The command requested."
},
"message": {
"type": "string",
"description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.",
"_enum": [ "cancelled", "notStopped" ],
"enumDescriptions": [
"the request was cancelled.",
"the request may be retried once the adapter is in a 'stopped' state."
]
},
"body": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "Contains request result if success is true and error details if success is false."
}
},
"required": [ "type", "request_seq", "success", "command" ]
}]
},
"ErrorResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "On error (whenever `success` is false), the body can provide more details.",
"properties": {
"body": {
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/Message",
"description": "A structured error message."
}
}
}
},
"required": [ "body" ]
}]
},
"CancelRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence.\nClients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis 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.\nThe `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.\nThe 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`).\nReturning 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.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.",
"properties": {
"command": {
"type": "string",
"enum": [ "cancel" ]
},
"arguments": {
"$ref": "#/definitions/CancelArguments"
}
},
"required": [ "command" ]
}]
},
"CancelArguments": {
"type": "object",
"description": "Arguments for `cancel` request.",
"properties": {
"requestId": {
"type": "integer",
"description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request."
},
"progressId": {
"type": "string",
"description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request."
}
}
},
"CancelResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required."
}]
},
"InitializedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"title": "Events",
"description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.",
"properties": {
"event": {
"type": "string",
"enum": [ "initialized" ]
}
},
"required": [ "event" ]
}]
},
"StoppedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.",
"properties": {
"event": {
"type": "string",
"enum": [ "stopped" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).",
"_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ]
},
"description": {
"type": "string",
"description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated."
},
"threadId": {
"type": "integer",
"description": "The thread which was stopped."
},
"preserveFocusHint": {
"type": "boolean",
"description": "A value of true hints to the client that this event should not change the focus."
},
"text": {
"type": "string",
"description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI."
},
"allThreadsStopped": {
"type": "boolean",
"description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded."
},
"hitBreakpointIds": {
"type": "array",
"items": {
"type": "integer"
},
"description": "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:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location."
}
},
"required": [ "reason" ]
}
},
"required": [ "event", "body" ]
}]
},
"ContinuedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the execution of the debuggee has continued.\nPlease 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`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.",
"properties": {
"event": {
"type": "string",
"enum": [ "continued" ]
},
"body": {
"type": "object",
"properties": {
"threadId": {
"type": "integer",
"description": "The thread which was continued."
},
"allThreadsContinued": {
"type": "boolean",
"description": "If omitted or set to `true`, this event signals to the client that all threads have been resumed. The value `false` indicates that not all threads were resumed."
}
},
"required": [ "threadId" ]
}
},
"required": [ "event", "body" ]
}]
},
"ExitedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the debuggee has exited and returns its exit code.",
"properties": {
"event": {
"type": "string",
"enum": [ "exited" ]
},
"body": {
"type": "object",
"properties": {
"exitCode": {
"type": "integer",
"description": "The exit code returned from the debuggee."
}
},
"required": [ "exitCode" ]
}
},
"required": [ "event", "body" ]
}]
},
"TerminatedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.",
"properties": {
"event": {
"type": "string",
"enum": [ "terminated" ]
},
"body": {
"type": "object",
"properties": {
"restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests."
}
}
}
},
"required": [ "event" ]
}]
},
"ThreadEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that a thread has started or exited.",
"properties": {
"event": {
"type": "string",
"enum": [ "thread" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"_enum": [ "started", "exited" ]
},
"threadId": {
"type": "integer",
"description": "The identifier of the thread."
}
},
"required": ["reason", "threadId"]
}
},
"required": [ "event", "body" ]
}]
},
"OutputEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that the target has produced some output.",
"properties": {
"event": {
"type": "string",
"enum": [ "output" ]
},
"body": {
"type": "object",
"properties": {
"category": {
"type": "string",
"description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.",
"_enum": [ "console", "important", "stdout", "stderr", "telemetry" ],
"enumDescriptions": [
"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).",
"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.",
"Show the output as normal program output from the debuggee.",
"Show the output as error program output from the debuggee.",
"Send the output to telemetry instead of showing it to the user."
]
},
"output": {
"type": "string",
"description": "The output to report.\n\nANSI escape sequences may be used to influence 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.\n\nIf the `supportsANSIStyling` capabilities are not both true, then the client should display the output literally."
},
"group": {
"type": "string",
"description": "Support for keeping an output log organized by grouping related messages.",
"enum": [ "start", "startCollapsed", "end" ],
"enumDescriptions": [
"Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.",
"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).\nThe `output` attribute becomes the name of the group and is not indented.",
"End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group."
]
},
"variablesReference": {
"type": "integer",
"description": "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."
},
"source": {
"$ref": "#/definitions/Source",
"description": "The source location where the output was produced."
},
"line": {
"type": "integer",
"description": "The source location's line where the output was produced."
},
"column": {
"type": "integer",
"description": "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."
},
"data": {
"type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ],
"description": "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."
},
"locationReference": {
"type": "integer",
"description": "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.\n\nThis reference shares the same lifetime as the `variablesReference`. See 'Lifetime of Object References' in the Overview section for details."
}
},
"required": ["output"]
}
},
"required": [ "event", "body" ]
}]
},
"BreakpointEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some information about a breakpoint has changed.",
"properties": {
"event": {
"type": "string",
"enum": [ "breakpoint" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"_enum": [ "changed", "new", "removed" ]
},
"breakpoint": {
"$ref": "#/definitions/Breakpoint",
"description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values."
}
},
"required": [ "reason", "breakpoint" ]
}
},
"required": [ "event", "body" ]
}]
},
"ModuleEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some information about a module has changed.",
"properties": {
"event": {
"type": "string",
"enum": [ "module" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"enum": [ "new", "changed", "removed" ]
},
"module": {
"$ref": "#/definitions/Module",
"description": "The new, changed, or removed module. In case of `removed` only the module id is used."
}
},
"required": [ "reason", "module" ]
}
},
"required": [ "event", "body" ]
}]
},
"LoadedSourceEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.",
"properties": {
"event": {
"type": "string",
"enum": [ "loadedSource" ]
},
"body": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "The reason for the event.",
"enum": [ "new", "changed", "removed" ]
},
"source": {
"$ref": "#/definitions/Source",
"description": "The new, changed, or removed source."
}
},
"required": [ "reason", "source" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProcessEvent": {
"allOf": [
{ "$ref": "#/definitions/Event" },
{
"type": "object",
"description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.",
"properties": {
"event": {
"type": "string",
"enum": [ "process" ]
},
"body": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js."
},
"systemProcessId": {
"type": "integer",
"description": "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."
},
"isLocalProcess": {
"type": "boolean",
"description": "If true, the process is running on the same computer as the debug adapter."
},
"startMethod": {
"type": "string",
"enum": [ "launch", "attach", "attachForSuspendedLaunch" ],
"description": "Describes how the debug engine started debugging this process.",
"enumDescriptions": [
"Process was launched under the debugger.",
"Debugger attached to an existing process.",
"A project launcher component has launched a new process in a suspended state and then asked the debugger to attach."
]
},
"pointerSize": {
"type": "integer",
"description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display."
}
},
"required": [ "name" ]
}
},
"required": [ "event", "body" ]
}
]
},
"CapabilitiesEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently 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.\nOnly changed capabilities need to be included, all other capabilities keep their values.",
"properties": {
"event": {
"type": "string",
"enum": [ "capabilities" ]
},
"body": {
"type": "object",
"properties": {
"capabilities": {
"$ref": "#/definitions/Capabilities",
"description": "The set of updated capabilities."
}
},
"required": [ "capabilities" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressStartEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressStart" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session."
},
"title": {
"type": "string",
"description": "Short title of the progress reporting. Shown in the UI to describe the long running operation."
},
"requestId": {
"type": "integer",
"description": "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.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter."
},
"cancellable": {
"type": "boolean",
"description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting."
},
"message": {
"type": "string",
"description": "More detailed progress message."
},
"percentage": {
"type": "number",
"description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown."
}
},
"required": [ "progressId", "title" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressUpdateEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressUpdate" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "The ID that was introduced in the initial `progressStart` event."
},
"message": {
"type": "string",
"description": "More detailed progress message. If omitted, the previous message (if any) is used."
},
"percentage": {
"type": "number",
"description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"ProgressEndEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "progressEnd" ]
},
"body": {
"type": "object",
"properties": {
"progressId": {
"type": "string",
"description": "The ID that was introduced in the initial `ProgressStartEvent`."
},
"message": {
"type": "string",
"description": "More detailed progress message. If omitted, the previous message (if any) is used."
}
},
"required": [ "progressId" ]
}
},
"required": [ "event", "body" ]
}]
},
"InvalidatedEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug 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.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.",
"properties": {
"event": {
"type": "string",
"enum": [ "invalidated" ]
},
"body": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"description": "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`.",
"items": {
"$ref": "#/definitions/InvalidatedAreas"
}
},
"threadId": {
"type": "integer",
"description": "If specified, the client only needs to refetch data related to this thread."
},
"stackFrameId": {
"type": "integer",
"description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)."
}
}
}
},
"required": [ "event", "body" ]
}]
},
"MemoryEvent": {
"allOf": [ { "$ref": "#/definitions/Event" }, {
"type": "object",
"description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients 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.\nDebug 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.",
"properties": {
"event": {
"type": "string",
"enum": [ "memory" ]
},
"body": {
"type": "object",
"properties": {
"memoryReference": {
"type": "string",
"description": "Memory reference of a memory range that has been updated."
},
"offset": {
"type": "integer",
"description": "Starting offset in bytes where memory has been updated. Can be negative."
},
"count": {
"type": "integer",
"description": "Number of bytes updated."
}
},
"required": [ "memoryReference", "offset", "count" ]
}
},
"required": [ "event", "body" ]
}]
},
"RunInTerminalRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"title": "Reverse Requests",
"description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient 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.\nSome 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.",
"properties": {
"command": {
"type": "string",
"enum": [ "runInTerminal" ]
},
"arguments": {
"$ref": "#/definitions/RunInTerminalRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"RunInTerminalRequestArguments": {
"type": "object",
"description": "Arguments for `runInTerminal` request.",
"properties": {
"kind": {
"type": "string",
"enum": [ "integrated", "external" ],
"description": "What kind of terminal to launch. Defaults to `integrated` if not specified."
},
"title": {
"type": "string",
"description": "Title of the terminal."
},
"cwd": {
"type": "string",
"description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command."
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of arguments. The first argument is the command to run."
},
"env": {
"type": "object",
"description": "Environment key-value pairs that are added to or removed from the default environment.",
"additionalProperties": {
"type": [ "string", "null" ],
"description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment."
}
},
"argsCanBeInterpretedByShell": {
"type": "boolean",
"description": "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."
}
},
"required": [ "args", "cwd" ]
},
"RunInTerminalResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `runInTerminal` request.",
"properties": {
"body": {
"type": "object",
"properties": {
"processId": {
"type": "integer",
"description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)."
},
"shellProcessId": {
"type": "integer",
"description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)."
}
}
}
},
"required": [ "body" ]
}]
},
"StartDebuggingRequest": {
"allOf": [
{
"$ref": "#/definitions/Request"
},
{
"type": "object",
"description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA 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.",
"properties": {
"command": {
"type": "string",
"enum": [
"startDebugging"
]
},
"arguments": {
"$ref": "#/definitions/StartDebuggingRequestArguments"
}
},
"required": [
"command",
"arguments"
]
}
]
},
"StartDebuggingRequestArguments": {
"type": "object",
"description": "Arguments for `startDebugging` request.",
"properties": {
"configuration": {
"type": "object",
"additionalProperties": true,
"description": "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')."
},
"request": {
"type": "string",
"enum": [
"launch",
"attach"
],
"description": "Indicates whether the new debug session should be started with a `launch` or `attach` request."
}
},
"required": [
"configuration",
"request"
]
},
"StartDebuggingResponse": {
"allOf": [
{
"$ref": "#/definitions/Response"
},
{
"type": "object",
"description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required."
}
]
},
"InitializeRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"title": "Requests",
"description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.",
"properties": {
"command": {
"type": "string",
"enum": [ "initialize" ]
},
"arguments": {
"$ref": "#/definitions/InitializeRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"InitializeRequestArguments": {
"type": "object",
"description": "Arguments for `initialize` request.",
"properties": {
"clientID": {
"type": "string",
"description": "The ID of the client using this adapter."
},
"clientName": {
"type": "string",
"description": "The human-readable name of the client using this adapter."
},
"adapterID": {
"type": "string",
"description": "The ID of the debug adapter."
},
"locale": {
"type": "string",
"description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH."
},
"linesStartAt1": {
"type": "boolean",
"description": "If true all line numbers are 1-based (default)."
},
"columnsStartAt1": {
"type": "boolean",
"description": "If true all column numbers are 1-based (default)."
},
"pathFormat": {
"type": "string",
"_enum": [ "path", "uri" ],
"description": "Determines in what format paths are specified. The default is `path`, which is the native format."
},
"supportsVariableType": {
"type": "boolean",
"description": "Client supports the `type` attribute for variables."
},
"supportsVariablePaging": {
"type": "boolean",
"description": "Client supports the paging of variables."
},
"supportsRunInTerminalRequest": {
"type": "boolean",
"description": "Client supports the `runInTerminal` request."
},
"supportsMemoryReferences": {
"type": "boolean",
"description": "Client supports memory references."
},
"supportsProgressReporting": {
"type": "boolean",
"description": "Client supports progress reporting."
},
"supportsInvalidatedEvent": {
"type": "boolean",
"description": "Client supports the `invalidated` event."
},
"supportsMemoryEvent": {
"type": "boolean",
"description": "Client supports the `memory` event."
},
"supportsArgsCanBeInterpretedByShell": {
"type": "boolean",
"description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request."
},
"supportsStartDebuggingRequest": {
"type": "boolean",
"description": "Client supports the `startDebugging` request."
},
"supportsANSIStyling": {
"type": "boolean",
"description": "The client will interpret ANSI escape sequences in the display of `OutputEvent.output` and `Variable.value` fields when `Capabilities.supportsANSIStyling` is also enabled."
}
},
"required": [ "adapterID" ]
},
"InitializeResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `initialize` request.",
"properties": {
"body": {
"$ref": "#/definitions/Capabilities",
"description": "The capabilities of this debug adapter."
}
}
}]
},
"ConfigurationDoneRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.",
"properties": {
"command": {
"type": "string",
"enum": [ "configurationDone" ]
},
"arguments": {
"$ref": "#/definitions/ConfigurationDoneArguments"
}
},
"required": [ "command" ]
}]
},
"ConfigurationDoneArguments": {
"type": "object",
"description": "Arguments for `configurationDone` request."
},
"ConfigurationDoneResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `configurationDone` request. This is just an acknowledgement, so no body field is required."
}]
},
"LaunchRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.",
"properties": {
"command": {
"type": "string",
"enum": [ "launch" ]
},
"arguments": {
"$ref": "#/definitions/LaunchRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"LaunchRequestArguments": {
"type": "object",
"description": "Arguments for `launch` request. Additional attributes are implementation specific.",
"properties": {
"noDebug": {
"type": "boolean",
"description": "If true, the launch request should launch the program without enabling debugging."
},
"__restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact."
}
}
},
"LaunchResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `launch` request. This is just an acknowledgement, so no body field is required."
}]
},
"AttachRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.",
"properties": {
"command": {
"type": "string",
"enum": [ "attach" ]
},
"arguments": {
"$ref": "#/definitions/AttachRequestArguments"
}
},
"required": [ "command", "arguments" ]
}]
},
"AttachRequestArguments": {
"type": "object",
"description": "Arguments for `attach` request. Additional attributes are implementation specific.",
"properties": {
"__restart": {
"type": [ "array", "boolean", "integer", "null", "number", "object", "string" ],
"description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact."
}
}
},
"AttachResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `attach` request. This is just an acknowledgement, so no body field is required."
}]
},
"RestartRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.\nIf 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.",
"properties": {
"command": {
"type": "string",
"enum": [ "restart" ]
},
"arguments": {
"$ref": "#/definitions/RestartArguments"
}
},
"required": [ "command" ]
}]
},
"RestartArguments": {
"type": "object",
"description": "Arguments for `restart` request.",
"properties": {
"arguments": {
"oneOf": [
{ "$ref": "#/definitions/LaunchRequestArguments" },
{ "$ref": "#/definitions/AttachRequestArguments" }
],
"description": "The latest version of the `launch` or `attach` configuration."
}
}
},
"RestartResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `restart` request. This is just an acknowledgement, so no body field is required."
}]
},
"DisconnectRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).\nIn 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.\nThis 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).",
"properties": {
"command": {
"type": "string",
"enum": [ "disconnect" ]
},
"arguments": {
"$ref": "#/definitions/DisconnectArguments"
}
},
"required": [ "command" ]
}]
},
"DisconnectArguments": {
"type": "object",
"description": "Arguments for `disconnect` request.",
"properties": {
"restart": {
"type": "boolean",
"description": "A value of true indicates that this `disconnect` request is part of a restart sequence."
},
"terminateDebuggee": {
"type": "boolean",
"description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true."
},
"suspendDebuggee": {
"type": "boolean",
"description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true."
}
}
},
"DisconnectResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `disconnect` request. This is just an acknowledgement, so no body field is required."
}]
},
"TerminateRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {
"type": "object",
"description": "The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.\nTypically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.\nPlease 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.\nClients 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.",
"properties": {
"command": {
"type": "string",
"enum": [ "terminate" ]
},
"arguments": {
"$ref": "#/definitions/TerminateArguments"
}
},
"required": [ "command" ]
}]
},
"TerminateArguments": {
"type": "object",
"description": "Arguments for `terminate` request.",
"properties": {
"restart": {
"type": "boolean",
"description": "A value of true indicates that this `terminate` request is part of a restart sequence."
}
}
},
"TerminateResponse": {
"allOf": [ { "$ref": "#/definitions/Response" }, {
"type": "object",
"description": "Response to `terminate` request. This is just an acknowledgement, so no body field is required."
}]
},
"BreakpointLocationsRequest": {
"allOf": [ { "$ref": "#/definitions/Request" }, {