diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py index 5860bc2cd..6e5db8c65 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/__main__pydevd_gen_debug_adapter_protocol.py @@ -235,7 +235,7 @@ def update_class_to_generate_register_dec(classes_to_generate, class_to_generate command = classes_to_generate[request_name]['properties'].get('command') else: if response_name == 'ErrorResponse': - command = {'enum' : ['error']} + command = {'enum': ['error']} else: raise AssertionError('Unhandled: %s' % (response_name,)) @@ -398,7 +398,8 @@ def update_class_to_generate_init(class_to_generate): ref = prop['type'] ref_data = ref.ref_data if ref_data.get('is_enum', False): - init_body.append(' assert %s in %s.VALID_VALUES' % (prop_name, str(ref))) + init_body.append(' if %s is not None:' % (prop_name,)) + init_body.append(' assert %s in %s.VALID_VALUES' % (prop_name, str(ref))) init_body.append(' self.%(prop_name)s = %(prop_name)s' % dict( prop_name=prop_name)) else: diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json index 70002adc4..e94c1be28 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/debugProtocol.json @@ -129,7 +129,7 @@ "CancelRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The 'cancel' request is used by the frontend to indicate that it is no longer interested in the result produced by a specific request issued earlier.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back.\nThis 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 frontend client has no generic way for detecting that a response is partial or not.", + "description": "The 'cancel' request is used by the frontend 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. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor 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 frontend client has no generic way for detecting that a response is partial or not.\n The 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", @@ -148,10 +148,13 @@ "properties": { "requestId": { "type": "integer", - "description": "The ID (attribute 'seq') of the request to cancel." + "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." } - }, - "required": [ "id" ] + } }, "CancelResponse": { "allOf": [ { "$ref": "#/definitions/Response" }, { @@ -164,7 +167,7 @@ "allOf": [ { "$ref": "#/definitions/Event" }, { "type": "object", "title": "Events", - "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\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- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\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- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", "properties": { "event": { "type": "string", @@ -178,7 +181,7 @@ "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 break point previously set, a stepping action has completed, by executing a debugger statement etc.", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.", "properties": { "event": { "type": "string", @@ -190,7 +193,7 @@ "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" ] + "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] }, "description": { "type": "string", @@ -345,9 +348,19 @@ "type": "string", "description": "The output to report." }, + "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 decreases 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. The value should be less than or equal to 2147483647 (2^31 - 1)." + "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. The value should be less than or equal to 2147483647 (2^31-1)." }, "source": { "$ref": "#/definitions/Source", @@ -533,11 +546,149 @@ }] }, + "ProgressStartEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that a long running operation is about to start and\nprovides 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 client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressStart" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that must 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": "Mandatory (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\nprogress 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 canceled 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": "Optional, more detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ "progressId", "title" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressUpdateEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that the progress reporting needs to 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 client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "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": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressEndEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "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": "Optional, 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 debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "invalidated" ] + }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Optional 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 honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand 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" ] + }] + }, + "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. This is typically used to launch the debuggee in a terminal provided by the client.", + "description": "This optional 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 client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.", "properties": { "command": { "type": "string", @@ -565,7 +716,7 @@ }, "cwd": { "type": "string", - "description": "Working directory of the command." + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." }, "args": { "type": "array", @@ -595,11 +746,11 @@ "properties": { "processId": { "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31 - 1)." + "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)." + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." } } } @@ -612,7 +763,7 @@ "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 to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter. In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.\nThe 'initialize' request may only be sent once.", + "description": "The 'initialize' request is sent as the first request from the client to the debug adapter\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to 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", @@ -673,6 +824,14 @@ "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." } }, "required": [ "adapterID" ] @@ -693,7 +852,7 @@ "ConfigurationDoneRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The client of the debug protocol must send this request at the end of the sequence of configuration requests (which was started by the 'initialized' event).", + "description": "This optional 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 capability 'supportsConfigurationDoneRequest' is true.", "properties": { "command": { "type": "string", @@ -720,7 +879,7 @@ "LaunchRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true). Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "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", @@ -757,7 +916,7 @@ "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. Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "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", @@ -790,7 +949,7 @@ "RestartRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Restarts a debug session. If the capability 'supportsRestartRequest' is missing or has the value false,\nthe client will implement 'restart' by terminating the debug adapter first and then launching it anew.\nA debug adapter can override this default behaviour by implementing a restart request\nand setting the capability 'supportsRestartRequest' to true.", + "description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.", "properties": { "command": { "type": "string", @@ -817,7 +976,7 @@ "DisconnectRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging. It asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter. If the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee. If the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee. This behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", + "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", "properties": { "command": { "type": "string", @@ -840,7 +999,7 @@ }, "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.\nA client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability." + "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 capability 'supportTerminateDebuggee' is true." } } }, @@ -854,7 +1013,7 @@ "TerminateRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.", + "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.", "properties": { "command": { "type": "string", @@ -887,7 +1046,7 @@ "BreakpointLocationsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.", + "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.", "properties": { "command": { "type": "string", @@ -1009,7 +1168,7 @@ "items": { "$ref": "#/definitions/Breakpoint" }, - "description": "Information about the breakpoints. The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." } }, "required": [ "breakpoints" ] @@ -1022,7 +1181,7 @@ "SetFunctionBreakpointsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.\nClients should only call this request if the capability 'supportsFunctionBreakpoints' is true.", "properties": { "command": { "type": "string", @@ -1075,7 +1234,7 @@ "SetExceptionBreakpointsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request configures the debuggers response to thrown exceptions. If an exception is configured to break, a 'stopped' event is fired (with reason 'exception').", + "description": "The request configures the debuggers response to thrown exceptions.\nIf an exception is configured to break, a 'stopped' event is fired (with reason 'exception').\nClients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.", "properties": { "command": { "type": "string", @@ -1097,14 +1256,21 @@ "items": { "type": "string" }, - "description": "IDs of checked exception options. The set of IDs is returned via the 'exceptionBreakpointFilters' capability." + "description": "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." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "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 capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." }, "exceptionOptions": { "type": "array", "items": { "$ref": "#/definitions/ExceptionOptions" }, - "description": "Configuration options for selected exceptions." + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." } }, "required": [ "filters" ] @@ -1119,7 +1285,7 @@ "DataBreakpointInfoRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", "properties": { "command": { "type": "string", @@ -1142,7 +1308,7 @@ }, "name": { "type": "string", - "description": "The name of the Variable's child to obtain data breakpoint information for. If variableReference isn’t provided, this can be an expression." + "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variableReference isn’t provided, this can be an expression." } }, "required": [ "name" ] @@ -1185,7 +1351,7 @@ "SetDataBreakpointsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", "properties": { "command": { "type": "string", @@ -1235,6 +1401,63 @@ }] }, + "SetInstructionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a diassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setInstructionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setInstructionBreakpoints' request", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" + } + }, + "required": ["breakpoints"] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to 'setInstructionBreakpoints' request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + "ContinueRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", @@ -1257,7 +1480,7 @@ "properties": { "threadId": { "type": "integer", - "description": "Continue execution for the specified thread (if possible). If the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." + "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." } }, "required": [ "threadId" ] @@ -1272,7 +1495,7 @@ "properties": { "allThreadsContinued": { "type": "boolean", - "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead. If this attribute is missing a value of 'true' is assumed for backward compatibility." + "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." } } } @@ -1304,6 +1527,10 @@ "threadId": { "type": "integer", "description": "Execute 'next' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." } }, "required": [ "threadId" ] @@ -1342,6 +1569,10 @@ "targetId": { "type": "integer", "description": "Optional id of the target to step into." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." } }, "required": [ "threadId" ] @@ -1376,6 +1607,10 @@ "threadId": { "type": "integer", "description": "Execute 'stepOut' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." } }, "required": [ "threadId" ] @@ -1390,7 +1625,7 @@ "StepBackRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed. Clients should only call this request if the capability 'supportsStepBack' is true.", + "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nClients should only call this request if the capability 'supportsStepBack' is true.", "properties": { "command": { "type": "string", @@ -1410,6 +1645,10 @@ "threadId": { "type": "integer", "description": "Execute 'stepBack' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." } }, "required": [ "threadId" ] @@ -1424,7 +1663,7 @@ "ReverseContinueRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request starts the debuggee to run backward. Clients should only call this request if the capability 'supportsStepBack' is true.", + "description": "The request starts the debuggee to run backward.\nClients should only call this request if the capability 'supportsStepBack' is true.", "properties": { "command": { "type": "string", @@ -1458,7 +1697,7 @@ "RestartFrameRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.", + "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.\nClients should only call this request if the capability 'supportsRestartFrame' is true.", "properties": { "command": { "type": "string", @@ -1492,7 +1731,7 @@ "GotoRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).", "properties": { "command": { "type": "string", @@ -1564,7 +1803,7 @@ "StackTraceRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request returns a stacktrace from the current execution state.", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability 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 less frames than requested, which is an indication that the end of the stack has been reached.", "properties": { "command": { "type": "string", @@ -1595,7 +1834,7 @@ }, "format": { "$ref": "#/definitions/StackFrameFormat", - "description": "Specifies details on how to format the stack frames." + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." } }, "required": [ "threadId" ] @@ -1617,7 +1856,7 @@ }, "totalFrames": { "type": "integer", - "description": "The total number of frames available." + "description": "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." } }, "required": [ "stackFrames" ] @@ -1716,7 +1955,7 @@ }, "format": { "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Variable values." + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." } }, "required": [ "variablesReference" ] @@ -1747,7 +1986,7 @@ "SetVariableRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Set the variable with the given name in the variable container to a new value.", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.", "properties": { "command": { "type": "string", @@ -1801,15 +2040,15 @@ }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } }, "required": [ "value" ] @@ -1845,7 +2084,7 @@ }, "sourceReference": { "type": "integer", - "description": "The reference to the source. This is the same as source.sourceReference. This is provided for backward compatibility since old backends do not understand the 'source' attribute." + "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." } }, "required": [ "sourceReference" ] @@ -1913,7 +2152,7 @@ "TerminateThreadsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "The request terminates the threads with the given ids.", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.", "properties": { "command": { "type": "string", @@ -1949,7 +2188,7 @@ "ModulesRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Modules can be retrieved from the debug adapter with the ModulesRequest which can either return all modules or a range of modules to support paging.", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the capability 'supportsModulesRequest' is true.", "properties": { "command": { "type": "string", @@ -2006,7 +2245,7 @@ "LoadedSourcesRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Retrieves the set of all sources currently loaded by the debugged process.", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.", "properties": { "command": { "type": "string", @@ -2076,17 +2315,18 @@ }, "context": { "type": "string", - "_enum": [ "watch", "repl", "hover" ], + "_enum": [ "watch", "repl", "hover", "clipboard" ], "enumDescriptions": [ "evaluate is run in a watch.", "evaluate is run from REPL console.", - "evaluate is run from a data hover." + "evaluate is run from a data hover.", + "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." ], "description": "The context in which the evaluate request is run." }, "format": { "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Evaluate result." + "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." } }, "required": [ "expression" ] @@ -2105,7 +2345,7 @@ }, "type": { "type": "string", - "description": "The optional type of the evaluate result." + "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", @@ -2113,19 +2353,19 @@ }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "Memory reference to a location appropriate for this result. For pointer type eval results, this is generally a reference to the memory address contained in the pointer." + "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." } }, "required": [ "result", "variablesReference" ] @@ -2138,7 +2378,7 @@ "SetExpressionRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.", + "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.", "properties": { "command": { "type": "string", @@ -2188,7 +2428,7 @@ }, "type": { "type": "string", - "description": "The optional type of the value." + "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", @@ -2196,15 +2436,15 @@ }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } }, "required": [ "value" ] @@ -2217,7 +2457,7 @@ "StepInTargetsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.", + "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.\nClients should only call this request if the capability 'supportsStepInTargetsRequest' is true.", "properties": { "command": { "type": "string", @@ -2267,7 +2507,7 @@ "GotoTargetsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nThe GotoTargets request may only be called if the 'supportsGotoTargetsRequest' capability exists and is true.", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true.", "properties": { "command": { "type": "string", @@ -2325,7 +2565,7 @@ "CompletionsRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Returns a list of possible completions for a given caret position and text.\nThe CompletionsRequest may only be called if the 'supportsCompletionsRequest' capability exists and is true.", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the capability 'supportsCompletionsRequest' is true.", "properties": { "command": { "type": "string", @@ -2387,7 +2627,7 @@ "ExceptionInfoRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Retrieves the details of the exception that caused this event to be raised.", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the capability 'supportsExceptionInfoRequest' is true.", "properties": { "command": { "type": "string", @@ -2446,7 +2686,7 @@ "ReadMemoryRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Reads bytes from memory at the provided location.", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the capability 'supportsReadMemoryRequest' is true.", "properties": { "command": { "type": "string", @@ -2488,11 +2728,11 @@ "properties": { "address": { "type": "string", - "description": "The address of the first byte of data returned. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." }, "unreadableBytes": { "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." }, "data": { "type": "string", @@ -2508,7 +2748,7 @@ "DisassembleRequest": { "allOf": [ { "$ref": "#/definitions/Request" }, { "type": "object", - "description": "Disassembles code stored at the provided location.", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the capability 'supportsDisassembleRequest' is true.", "properties": { "command": { "type": "string", @@ -2539,7 +2779,7 @@ }, "instructionCount": { "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset. An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." }, "resolveSymbols": { "type": "boolean", @@ -2600,7 +2840,7 @@ "items": { "$ref": "#/definitions/ExceptionBreakpointsFilter" }, - "description": "Available filters or options for the setExceptionBreakpoints request." + "description": "Available exception filter options for the 'setExceptionBreakpoints' request." }, "supportsStepBack": { "type": "boolean", @@ -2673,7 +2913,7 @@ }, "supportsDelayedStackTraceLoading": { "type": "boolean", - "description": "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." + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." }, "supportsLoadedSourcesRequest": { "type": "boolean", @@ -2714,25 +2954,45 @@ "supportsBreakpointLocationsRequest": { "type": "boolean", "description": "The debug adapter supports the 'breakpointLocations' request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." } } }, "ExceptionBreakpointsFilter": { "type": "object", - "description": "An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are dealt with.", + "description": "An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.", "properties": { "filter": { "type": "string", - "description": "The internal ID of the filter. This value is passed to the setExceptionBreakpoints request." + "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." }, "label": { "type": "string", - "description": "The name of the filter. This will be shown in the UI." + "description": "The name of the filter option. This will be shown in the UI." }, "default": { "type": "boolean", - "description": "Initial value of the filter. If not specified a value 'false' is assumed." + "description": "Initial value of the filter option. If not specified a value 'false' is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." } }, "required": [ "filter", "label" ] @@ -2828,7 +3088,7 @@ "ColumnDescriptor": { "type": "object", - "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it, and what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", "properties": { "attributeName": { "type": "string", @@ -2887,23 +3147,23 @@ "Source": { "type": "object", - "description": "A Source is a descriptor for source code. It is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", + "description": "A Source is a descriptor for source code.\nIt is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", "properties": { "name": { "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional." + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." }, "path": { "type": "string", - "description": "The path of the source to be shown in the UI. It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." }, "sourceReference": { "type": "integer", - "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "presentationHint": { "type": "string", - "description": "An optional hint for how to present the source in the UI. A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", + "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", "enum": [ "normal", "emphasize", "deemphasize" ] }, "origin": { @@ -2919,7 +3179,7 @@ }, "adapterData": { "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Optional data that a debug adapter might want to loop through the client. The client should leave the data intact and persist it across sessions. The client should not interpret the data." + "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." }, "checksums": { "type": "array", @@ -2937,7 +3197,7 @@ "properties": { "id": { "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads. This id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." }, "name": { "type": "string", @@ -2974,7 +3234,7 @@ "presentationHint": { "type": "string", "enum": [ "normal", "label", "subtle" ], - "description": "An optional hint for how to present this frame in the UI. A 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." + "description": "An optional hint for how to present this frame in the UI.\nA 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." } }, "required": [ "id", "name", "line", "column" ] @@ -3052,7 +3312,7 @@ }, "type": { "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value." + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", @@ -3076,7 +3336,7 @@ }, "memoryReference": { "type": "string", - "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer." + "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." } }, "required": [ "name", "value", "variablesReference" ] @@ -3100,7 +3360,7 @@ "Indicates that the object is an inner class.", "Indicates that the object is an interface.", "Indicates that the object is the most derived class.", - "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.", + "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", "Indicates that a data breakpoint is registered for the object." ] }, @@ -3167,15 +3427,15 @@ }, "condition": { "type": "string", - "description": "An optional expression for conditional breakpoints." + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." }, "logMessage": { "type": "string", - "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop) but log the message instead. Expressions within {} are interpolated." + "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." } }, "required": [ "line" ] @@ -3191,11 +3451,11 @@ }, "condition": { "type": "string", - "description": "An optional expression for conditional breakpoints." + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." } }, "required": [ "name" ] @@ -3225,15 +3485,39 @@ }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." } }, "required": [ "dataId" ] }, + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the setInstructionBreakpoints request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + }, + "required": [ "instructionReference" ] + }, + "Breakpoint": { "type": "object", - "description": "Information about a Breakpoint created in setBreakpoints or setFunctionBreakpoints.", + "description": "Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.", "properties": { "id": { "type": "integer", @@ -3245,7 +3529,7 @@ }, "message": { "type": "string", - "description": "An optional message about the state of the breakpoint. This is shown to the user and can be used to explain why a breakpoint could not be verified." + "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." }, "source": { "$ref": "#/definitions/Source", @@ -3265,12 +3549,31 @@ }, "endColumn": { "type": "integer", - "description": "An optional end column of the actual range covered by the breakpoint. If no end line is given, then the end column is assumed to be in the start line." + "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "An optional memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." } }, "required": [ "verified" ] }, + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.", + "enum": [ "statement", "line", "instruction" ], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++) could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + "StepInTarget": { "type": "object", "description": "A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.", @@ -3350,6 +3653,14 @@ "length": { "type": "integer", "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." } }, "required": [ "label" ] @@ -3431,6 +3742,22 @@ }] }, + "ExceptionFilterOptions": { + "type": "object", + "description": "An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." + } + }, + "required": [ "filterId" ] + }, + "ExceptionOptions": { "type": "object", "description": "An ExceptionOptions assigns configuration options to a set of exceptions.", @@ -3440,7 +3767,7 @@ "items": { "$ref": "#/definitions/ExceptionPathSegment" }, - "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. By convention the first segment of the path is a category that is used to group exceptions in the UI." + "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." }, "breakMode": { "$ref": "#/definitions/ExceptionBreakMode", @@ -3458,7 +3785,7 @@ "ExceptionPathSegment": { "type": "object", - "description": "An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a tree of exceptions. If a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or it matches anything except the names provided if 'negate' is true.", + "description": "An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or\nit matches anything except the names provided if 'negate' is true.", "properties": { "negate": { "type": "boolean", @@ -3531,7 +3858,7 @@ }, "location": { "$ref": "#/definitions/Source", - "description": "Source location that corresponds to this instruction, if any. Should always be set (if available) on the first instruction returned, but can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." }, "line": { "type": "integer", @@ -3551,6 +3878,18 @@ } }, "required": [ "address", "instruction" ] + }, + + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the 'invalidated' event.", + "_enum": [ "all", "stacks", "threads", "variables" ], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] } } diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py index defbe97bb..14ab9c4c0 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py @@ -407,8 +407,13 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class CancelRequest(BaseSchema): """ - The 'cancel' request is used by the frontend to indicate that it is no longer interested in the - result produced by a specific request issued earlier. + The 'cancel' request is used by the frontend in two situations: + + - to indicate that it is no longer interested in the result produced by a specific request issued + earlier + + - to cancel a progress sequence. Clients should only call this request if the capability + 'supportsCancelRequest' is true. This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees. @@ -418,13 +423,17 @@ class CancelRequest(BaseSchema): A frontend client should only call this request if the capability 'supportsCancelRequest' is true. - The request that got canceled still needs to send a response back. + The request that got canceled still needs to send a response back. This can either be a normal + result ('success' attribute true) - This can either be a normal result ('success' attribute true) or an error response ('success' - attribute false and the 'message' set to 'cancelled'). + or an error response ('success' attribute false and the 'message' set to 'cancelled'). Returning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not. + + The progress that got cancelled still needs to send a 'progressEnd' event back. + + A client should not assume that progress just got cancelled after sending the 'cancel' request. Note: automatically generated code. Do not edit manually. """ @@ -498,27 +507,38 @@ class CancelArguments(BaseSchema): __props__ = { "requestId": { "type": "integer", - "description": "The ID (attribute 'seq') of the request to cancel." + "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." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, requestId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, requestId=None, progressId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param integer requestId: The ID (attribute 'seq') of the request to cancel. + :param integer requestId: The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled. + Both a 'requestId' and a 'progressId' can be specified in one request. + :param string progressId: The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled. + Both a 'requestId' and a 'progressId' can be specified in one request. """ self.requestId = requestId + self.progressId = progressId self.kwargs = kwargs def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) requestId = self.requestId + progressId = self.progressId dct = { } if requestId is not None: dct['requestId'] = requestId + if progressId is not None: + dct['progressId'] = progressId dct.update(self.kwargs) return dct @@ -645,7 +665,8 @@ class InitializedEvent(BaseSchema): - frontend sends zero or more 'setBreakpoints' requests - - frontend sends one 'setFunctionBreakpoints' request + - frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' + is true) - frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false) @@ -727,7 +748,7 @@ class StoppedEvent(BaseSchema): """ The event indicates that the execution of the debuggee has stopped due to some condition. - This can be caused by a break point previously set, a stepping action has completed, by executing a + This can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc. Note: automatically generated code. Do not edit manually. @@ -764,7 +785,8 @@ class StoppedEvent(BaseSchema): "entry", "goto", "function breakpoint", - "data breakpoint" + "data breakpoint", + "instruction breakpoint" ] }, "description": { @@ -1197,9 +1219,23 @@ class OutputEvent(BaseSchema): "type": "string", "description": "The output to report." }, + "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 decreases 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. The value should be less than or equal to 2147483647 (2^31 - 1)." + "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. The value should be less than or equal to 2147483647 (2^31-1)." }, "source": { "$ref": "#/definitions/Source", @@ -1708,12 +1744,19 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct -@register_request('runInTerminal') +@register_event('progressStart') @register -class RunInTerminalRequest(BaseSchema): +class ProgressStartEvent(BaseSchema): """ - This request is sent from the debug adapter to the client to run a command in a terminal. This is - typically used to launch the debuggee in a terminal provided by the client. + The event signals that a long running operation is about to start and + + provides additional information for the client to set up a corresponding progress and cancellation + UI. + + The client is free to delay the showing of the UI in order to reduce flicker. + + This event should only be sent if the client has passed the value true for the + 'supportsProgressReporting' capability of the 'initialize' request. Note: automatically generated code. Do not edit manually. """ @@ -1726,149 +1769,182 @@ class RunInTerminalRequest(BaseSchema): "type": { "type": "string", "enum": [ - "request" + "event" ] }, - "command": { + "event": { "type": "string", "enum": [ - "runInTerminal" + "progressStart" ] }, - "arguments": { - "type": "RunInTerminalRequestArguments" + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that must 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": "Mandatory (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\nprogress 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 canceled 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": "Optional, more detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ + "progressId", + "title" + ] } } - __refs__ = set(['arguments']) + __refs__ = set(['body']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string type: - :param string command: - :param RunInTerminalRequestArguments arguments: + :param string event: + :param ProgressStartEventBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ - self.type = 'request' - self.command = 'runInTerminal' - if arguments is None: - self.arguments = RunInTerminalRequestArguments() + self.type = 'event' + self.event = 'progressStart' + if body is None: + self.body = ProgressStartEventBody() else: - self.arguments = RunInTerminalRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != RunInTerminalRequestArguments else arguments + self.body = ProgressStartEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressStartEventBody else body self.seq = seq self.kwargs = kwargs def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) - command = self.command - arguments = self.arguments + event = self.event + body = self.body seq = self.seq dct = { 'type': type, - 'command': command, - 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), 'seq': seq, } dct.update(self.kwargs) return dct +@register_event('progressUpdate') @register -class RunInTerminalRequestArguments(BaseSchema): +class ProgressUpdateEvent(BaseSchema): """ - Arguments for 'runInTerminal' request. + The event signals that the progress reporting needs to updated with a new message and/or percentage. + + The client does not have to update the UI immediately, but the clients needs to keep track of the + message and/or percentage values. + + This event should only be sent if the client has passed the value true for the + 'supportsProgressReporting' capability of the 'initialize' request. Note: automatically generated code. Do not edit manually. """ __props__ = { - "kind": { - "type": "string", - "enum": [ - "integrated", - "external" - ], - "description": "What kind of terminal to launch." + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." }, - "title": { + "type": { "type": "string", - "description": "Optional title of the terminal." + "enum": [ + "event" + ] }, - "cwd": { + "event": { "type": "string", - "description": "Working directory of the command." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of arguments. The first argument is the command to run." + "enum": [ + "progressUpdate" + ] }, - "env": { + "body": { "type": "object", - "description": "Environment key-value pairs that are added to or removed from the default environment.", - "additionalProperties": { - "type": [ - "string", - "null" - ], - "description": "Proper values must be strings. A value of 'null' removes the variable from the environment." - } + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'progressStart' event." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ + "progressId" + ] } } - __refs__ = set(['env']) + __refs__ = set(['body']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, cwd, args, kind=None, title=None, env=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string cwd: Working directory of the command. - :param array args: List of arguments. The first argument is the command to run. - :param string kind: What kind of terminal to launch. - :param string title: Optional title of the terminal. - :param RunInTerminalRequestArgumentsEnv env: Environment key-value pairs that are added to or removed from the default environment. + :param string type: + :param string event: + :param ProgressUpdateEventBody body: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ - self.cwd = cwd - self.args = args - self.kind = kind - self.title = title - if env is None: - self.env = RunInTerminalRequestArgumentsEnv() + self.type = 'event' + self.event = 'progressUpdate' + if body is None: + self.body = ProgressUpdateEventBody() else: - self.env = RunInTerminalRequestArgumentsEnv(update_ids_from_dap=update_ids_from_dap, **env) if env.__class__ != RunInTerminalRequestArgumentsEnv else env + self.body = ProgressUpdateEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressUpdateEventBody else body + self.seq = seq self.kwargs = kwargs def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - cwd = self.cwd - args = self.args - if args and hasattr(args[0], "to_dict"): - args = [x.to_dict() for x in args] - kind = self.kind - title = self.title - env = self.env + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq dct = { - 'cwd': cwd, - 'args': args, + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, } - if kind is not None: - dct['kind'] = kind - if title is not None: - dct['title'] = title - if env is not None: - dct['env'] = env.to_dict(update_ids_to_dap=update_ids_to_dap) dct.update(self.kwargs) return dct -@register_response('runInTerminal') +@register_event('progressEnd') @register -class RunInTerminalResponse(BaseSchema): +class ProgressEndEvent(BaseSchema): """ - Response to 'runInTerminal' request. + The event signals the end of the progress reporting with an optional final message. + + This event should only be sent if the client has passed the value true for the + 'supportsProgressReporting' capability of the 'initialize' request. Note: automatically generated code. Do not edit manually. """ @@ -1881,110 +1957,81 @@ class RunInTerminalResponse(BaseSchema): "type": { "type": "string", "enum": [ - "response" + "event" ] }, - "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": { + "event": { "type": "string", - "description": "Contains the raw error in short form if 'success' is false.\nThis raw error might be interpreted by the frontend and is not shown in the UI.\nSome predefined values exist.", - "_enum": [ - "cancelled" - ], - "enumDescriptions": [ - "request was cancelled." + "enum": [ + "progressEnd" ] }, "body": { "type": "object", "properties": { - "processId": { - "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31 - 1)." + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'ProgressStartEvent'." }, - "shellProcessId": { - "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31 - 1)." + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." } - } + }, + "required": [ + "progressId" + ] } } __refs__ = set(['body']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string type: - :param integer request_seq: Sequence number of the corresponding request. - :param boolean success: Outcome of the request. - If true, the request was successful and the 'body' attribute may contain the result of the request. - If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). - :param string command: The command requested. - :param RunInTerminalResponseBody body: + :param string event: + :param ProgressEndEventBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. - :param string message: Contains the raw error in short form if 'success' is false. - This raw error might be interpreted by the frontend and is not shown in the UI. - Some predefined values exist. """ - self.type = 'response' - self.request_seq = request_seq - self.success = success - self.command = command + self.type = 'event' + self.event = 'progressEnd' if body is None: - self.body = RunInTerminalResponseBody() + self.body = ProgressEndEventBody() else: - self.body = RunInTerminalResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != RunInTerminalResponseBody else body + self.body = ProgressEndEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != ProgressEndEventBody else body self.seq = seq - self.message = message self.kwargs = kwargs def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) type = self.type # noqa (assign to builtin) - request_seq = self.request_seq - success = self.success - command = self.command + event = self.event body = self.body seq = self.seq - message = self.message dct = { 'type': type, - 'request_seq': request_seq, - 'success': success, - 'command': command, + 'event': event, 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), 'seq': seq, } - if message is not None: - dct['message'] = message dct.update(self.kwargs) return dct -@register_request('initialize') +@register_event('invalidated') @register -class InitializeRequest(BaseSchema): +class InvalidatedEvent(BaseSchema): """ - 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. + 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. - Until the debug adapter has responded to with an 'initialize' response, the client must not send any - additional requests or events to the debug adapter. In addition the debug adapter is not allowed to - send any requests or events to the client until it has responded with an 'initialize' response. + Debug adapters do not have to emit this event for runtime changes like stopped or thread events + because in that case the client refetches the new state anyway. But the event can be used for + example to refresh the UI after rendering formatting has changed in the debug adapter. - The 'initialize' request may only be sent once. + This event should only be sent if the debug adapter has received a value true for the + 'supportsInvalidatedEvent' capability of the 'initialize' request. Note: automatically generated code. Do not edit manually. """ @@ -1997,28 +2044,391 @@ class InitializeRequest(BaseSchema): "type": { "type": "string", "enum": [ - "request" + "event" ] }, - "command": { + "event": { "type": "string", "enum": [ - "initialize" + "invalidated" ] }, - "arguments": { - "type": "InitializeRequestArguments" + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Optional 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 honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand 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)." + } + } } } - __refs__ = set(['arguments']) + __refs__ = set(['body']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, body, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string type: - :param string command: - :param InitializeRequestArguments arguments: + :param string event: + :param InvalidatedEventBody body: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. + """ + self.type = 'event' + self.event = 'invalidated' + if body is None: + self.body = InvalidatedEventBody() + else: + self.body = InvalidatedEventBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != InvalidatedEventBody else body + self.seq = seq + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + event = self.event + body = self.body + seq = self.seq + dct = { + 'type': type, + 'event': event, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + dct.update(self.kwargs) + return dct + + +@register_request('runInTerminal') +@register +class RunInTerminalRequest(BaseSchema): + """ + This optional request is sent from the debug adapter to the client to run a command in a terminal. + + This is typically used to launch the debuggee in a terminal provided by the client. + + This request should only be called if the client has passed the value true for the + 'supportsRunInTerminalRequest' capability of the 'initialize' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "runInTerminal" + ] + }, + "arguments": { + "type": "RunInTerminalRequestArguments" + } + } + __refs__ = set(['arguments']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param RunInTerminalRequestArguments arguments: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. + """ + self.type = 'request' + self.command = 'runInTerminal' + if arguments is None: + self.arguments = RunInTerminalRequestArguments() + else: + self.arguments = RunInTerminalRequestArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != RunInTerminalRequestArguments else arguments + self.seq = seq + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + dct.update(self.kwargs) + return dct + + +@register +class RunInTerminalRequestArguments(BaseSchema): + """ + Arguments for 'runInTerminal' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "kind": { + "type": "string", + "enum": [ + "integrated", + "external" + ], + "description": "What kind of terminal to launch." + }, + "title": { + "type": "string", + "description": "Optional 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": "Proper values must be strings. A value of 'null' removes the variable from the environment." + } + } + } + __refs__ = set(['env']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, cwd, args, kind=None, title=None, env=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string cwd: Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command. + :param array args: List of arguments. The first argument is the command to run. + :param string kind: What kind of terminal to launch. + :param string title: Optional title of the terminal. + :param RunInTerminalRequestArgumentsEnv env: Environment key-value pairs that are added to or removed from the default environment. + """ + self.cwd = cwd + self.args = args + self.kind = kind + self.title = title + if env is None: + self.env = RunInTerminalRequestArgumentsEnv() + else: + self.env = RunInTerminalRequestArgumentsEnv(update_ids_from_dap=update_ids_from_dap, **env) if env.__class__ != RunInTerminalRequestArgumentsEnv else env + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + cwd = self.cwd + args = self.args + if args and hasattr(args[0], "to_dict"): + args = [x.to_dict() for x in args] + kind = self.kind + title = self.title + env = self.env + dct = { + 'cwd': cwd, + 'args': args, + } + if kind is not None: + dct['kind'] = kind + if title is not None: + dct['title'] = title + if env is not None: + dct['env'] = env.to_dict(update_ids_to_dap=update_ids_to_dap) + dct.update(self.kwargs) + return dct + + +@register_response('runInTerminal') +@register +class RunInTerminalResponse(BaseSchema): + """ + Response to 'runInTerminal' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "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 frontend and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ + "cancelled" + ], + "enumDescriptions": [ + "request was cancelled." + ] + }, + "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)." + } + } + } + } + __refs__ = set(['body']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the 'body' attribute may contain the result of the request. + If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). + :param string command: The command requested. + :param RunInTerminalResponseBody body: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. + :param string message: Contains the raw error in short form if 'success' is false. + This raw error might be interpreted by the frontend and is not shown in the UI. + Some predefined values exist. + """ + self.type = 'response' + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = RunInTerminalResponseBody() + else: + self.body = RunInTerminalResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != RunInTerminalResponseBody else body + self.seq = seq + self.message = message + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + if message is not None: + dct['message'] = message + dct.update(self.kwargs) + return dct + + +@register_request('initialize') +@register +class InitializeRequest(BaseSchema): + """ + The 'initialize' request is sent as the first request from the client to the debug adapter + + in order to configure it with client capabilities and to retrieve capabilities from the debug + adapter. + + Until the debug adapter has responded to with an 'initialize' response, the client must not send any + additional requests or events to the debug adapter. + + In addition the debug adapter is not allowed to send any requests or events to the client until it + has responded with an 'initialize' response. + + The 'initialize' request may only be sent once. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "initialize" + ] + }, + "arguments": { + "type": "InitializeRequestArguments" + } + } + __refs__ = set(['arguments']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param InitializeRequestArguments arguments: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ self.type = 'request' @@ -2102,13 +2512,21 @@ class InitializeRequestArguments(BaseSchema): "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." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, adapterID, clientID=None, clientName=None, locale=None, linesStartAt1=None, columnsStartAt1=None, pathFormat=None, supportsVariableType=None, supportsVariablePaging=None, supportsRunInTerminalRequest=None, supportsMemoryReferences=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, adapterID, clientID=None, clientName=None, locale=None, linesStartAt1=None, columnsStartAt1=None, pathFormat=None, supportsVariableType=None, supportsVariablePaging=None, supportsRunInTerminalRequest=None, supportsMemoryReferences=None, supportsProgressReporting=None, supportsInvalidatedEvent=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string adapterID: The ID of the debug adapter. :param string clientID: The ID of the (frontend) client using this adapter. @@ -2121,6 +2539,8 @@ def __init__(self, adapterID, clientID=None, clientName=None, locale=None, lines :param boolean supportsVariablePaging: Client supports the paging of variables. :param boolean supportsRunInTerminalRequest: Client supports the runInTerminal request. :param boolean supportsMemoryReferences: Client supports memory references. + :param boolean supportsProgressReporting: Client supports progress reporting. + :param boolean supportsInvalidatedEvent: Client supports the invalidated event. """ self.adapterID = adapterID self.clientID = clientID @@ -2133,6 +2553,8 @@ def __init__(self, adapterID, clientID=None, clientName=None, locale=None, lines self.supportsVariablePaging = supportsVariablePaging self.supportsRunInTerminalRequest = supportsRunInTerminalRequest self.supportsMemoryReferences = supportsMemoryReferences + self.supportsProgressReporting = supportsProgressReporting + self.supportsInvalidatedEvent = supportsInvalidatedEvent self.kwargs = kwargs @@ -2148,6 +2570,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un supportsVariablePaging = self.supportsVariablePaging supportsRunInTerminalRequest = self.supportsRunInTerminalRequest supportsMemoryReferences = self.supportsMemoryReferences + supportsProgressReporting = self.supportsProgressReporting + supportsInvalidatedEvent = self.supportsInvalidatedEvent dct = { 'adapterID': adapterID, } @@ -2171,6 +2595,10 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un dct['supportsRunInTerminalRequest'] = supportsRunInTerminalRequest if supportsMemoryReferences is not None: dct['supportsMemoryReferences'] = supportsMemoryReferences + if supportsProgressReporting is not None: + dct['supportsProgressReporting'] = supportsProgressReporting + if supportsInvalidatedEvent is not None: + dct['supportsInvalidatedEvent'] = supportsInvalidatedEvent dct.update(self.kwargs) return dct @@ -2280,8 +2708,12 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class ConfigurationDoneRequest(BaseSchema): """ - The client of the debug protocol must send this request at the end of the sequence of configuration - requests (which was started by the 'initialized' event). + This optional request indicates that the client has finished initialization of the debug adapter. + + So it is the last request in the sequence of configuration requests (which was started by the + 'initialized' event). + + Clients should only call this request if the capability 'supportsConfigurationDoneRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -2483,9 +2915,11 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class LaunchRequest(BaseSchema): """ - The launch request is sent from the client to the debug adapter to start the debuggee with or - without debugging (if 'noDebug' is true). Since launching is debugger/runtime specific, the - arguments for this request are not part of this specification. + This launch request is sent from the client to the debug adapter to start the debuggee with or + without debugging (if 'noDebug' is true). + + Since launching is debugger/runtime specific, the arguments for this request are not part of this + specification. Note: automatically generated code. Do not edit manually. """ @@ -2713,8 +3147,10 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class AttachRequest(BaseSchema): """ The attach request is sent from the client to the debug adapter to attach to a debuggee that is - already running. Since attaching is debugger/runtime specific, the arguments for this request are - not part of this specification. + already running. + + Since attaching is debugger/runtime specific, the arguments for this request are not part of this + specification. Note: automatically generated code. Do not edit manually. """ @@ -2932,15 +3368,11 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class RestartRequest(BaseSchema): """ - Restarts a debug session. If the capability 'supportsRestartRequest' is missing or has the value - false, + Restarts a debug session. Clients should only call this request if the capability + 'supportsRestartRequest' is true. - the client will implement 'restart' by terminating the debug adapter first and then launching it - anew. - - A debug adapter can override this default behaviour by implementing a restart request - - and setting the capability 'supportsRestartRequest' to true. + If the capability is missing or has the value false, a typical client will emulate 'restart' by + terminating the debug adapter first and then launching it anew. Note: automatically generated code. Do not edit manually. """ @@ -3141,12 +3573,18 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class DisconnectRequest(BaseSchema): """ - The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging. It - asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter. If the - debuggee has been started with the 'launch' request, the 'disconnect' request terminates the - debuggee. If the 'attach' request was used to connect to the debuggee, 'disconnect' does not - terminate the debuggee. This behavior can be controlled with the 'terminateDebuggee' argument (if - supported by the debug adapter). + The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging. + + It asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter. + + If the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the + debuggee. + + If the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the + debuggee. + + This behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug + adapter). Note: automatically generated code. Do not edit manually. """ @@ -3224,7 +3662,7 @@ class DisconnectArguments(BaseSchema): }, "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.\nA client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability." + "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 capability 'supportTerminateDebuggee' is true." } } __refs__ = set() @@ -3236,7 +3674,7 @@ def __init__(self, restart=None, terminateDebuggee=None, update_ids_from_dap=Fal :param boolean restart: A value of true indicates that this 'disconnect' request is part of a restart sequence. :param boolean terminateDebuggee: Indicates whether the debuggee should be terminated when the debugger is disconnected. If unspecified, the debug adapter is free to do whatever it thinks is best. - A client can only rely on this attribute being properly honored if a debug adapter returns true for the 'supportTerminateDebuggee' capability. + The attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true. """ self.restart = restart self.terminateDebuggee = terminateDebuggee @@ -3368,6 +3806,8 @@ class TerminateRequest(BaseSchema): """ The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself. + + Clients should only call this request if the capability 'supportsTerminateRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -3578,6 +4018,9 @@ class BreakpointLocationsRequest(BaseSchema): """ The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range. + + Clients should only call this request if the capability 'supportsBreakpointLocationsRequest' is + true. Note: automatically generated code. Do not edit manually. """ @@ -4032,7 +4475,7 @@ class SetBreakpointsResponse(BaseSchema): "items": { "$ref": "#/definitions/Breakpoint" }, - "description": "Information about the breakpoints. The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." } }, "required": [ @@ -4103,6 +4546,8 @@ class SetFunctionBreakpointsRequest(BaseSchema): When a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated. + + Clients should only call this request if the capability 'supportsFunctionBreakpoints' is true. Note: automatically generated code. Do not edit manually. """ @@ -4197,23 +4642,281 @@ def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (u def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - breakpoints = self.breakpoints - if breakpoints and hasattr(breakpoints[0], "to_dict"): - breakpoints = [x.to_dict() for x in breakpoints] + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + 'breakpoints': [FunctionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, + } + dct.update(self.kwargs) + return dct + + +@register_response('setFunctionBreakpoints') +@register +class SetFunctionBreakpointsResponse(BaseSchema): + """ + Response to 'setFunctionBreakpoints' request. + + Returned is information about each breakpoint created by this request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "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 frontend and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ + "cancelled" + ], + "enumDescriptions": [ + "request was cancelled." + ] + }, + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ + "breakpoints" + ] + } + } + __refs__ = set(['body']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param integer request_seq: Sequence number of the corresponding request. + :param boolean success: Outcome of the request. + If true, the request was successful and the 'body' attribute may contain the result of the request. + If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). + :param string command: The command requested. + :param SetFunctionBreakpointsResponseBody body: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. + :param string message: Contains the raw error in short form if 'success' is false. + This raw error might be interpreted by the frontend and is not shown in the UI. + Some predefined values exist. + """ + self.type = 'response' + self.request_seq = request_seq + self.success = success + self.command = command + if body is None: + self.body = SetFunctionBreakpointsResponseBody() + else: + self.body = SetFunctionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetFunctionBreakpointsResponseBody else body + self.seq = seq + self.message = message + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + request_seq = self.request_seq + success = self.success + command = self.command + body = self.body + seq = self.seq + message = self.message + dct = { + 'type': type, + 'request_seq': request_seq, + 'success': success, + 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + if message is not None: + dct['message'] = message + dct.update(self.kwargs) + return dct + + +@register_request('setExceptionBreakpoints') +@register +class SetExceptionBreakpointsRequest(BaseSchema): + """ + The request configures the debuggers response to thrown exceptions. + + If an exception is configured to break, a 'stopped' event is fired (with reason 'exception'). + + Clients should only call this request if the capability 'exceptionBreakpointFilters' returns one or + more filters. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "enum": [ + "setExceptionBreakpoints" + ] + }, + "arguments": { + "type": "SetExceptionBreakpointsArguments" + } + } + __refs__ = set(['arguments']) + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string type: + :param string command: + :param SetExceptionBreakpointsArguments arguments: + :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. + """ + self.type = 'request' + self.command = 'setExceptionBreakpoints' + if arguments is None: + self.arguments = SetExceptionBreakpointsArguments() + else: + self.arguments = SetExceptionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetExceptionBreakpointsArguments else arguments + self.seq = seq + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + type = self.type # noqa (assign to builtin) + command = self.command + arguments = self.arguments + seq = self.seq + dct = { + 'type': type, + 'command': command, + 'arguments': arguments.to_dict(update_ids_to_dap=update_ids_to_dap), + 'seq': seq, + } + dct.update(self.kwargs) + return dct + + +@register +class SetExceptionBreakpointsArguments(BaseSchema): + """ + Arguments for 'setExceptionBreakpoints' request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "filters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "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." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "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 capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, filters, filterOptions=None, exceptionOptions=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array filters: 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. + :param array filterOptions: 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 capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive. + :param array exceptionOptions: Configuration options for selected exceptions. + The attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true. + """ + self.filters = filters + self.filterOptions = filterOptions + if update_ids_from_dap and self.filterOptions: + for o in self.filterOptions: + ExceptionFilterOptions.update_dict_ids_from_dap(o) + self.exceptionOptions = exceptionOptions + if update_ids_from_dap and self.exceptionOptions: + for o in self.exceptionOptions: + ExceptionOptions.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + filters = self.filters + if filters and hasattr(filters[0], "to_dict"): + filters = [x.to_dict() for x in filters] + filterOptions = self.filterOptions + if filterOptions and hasattr(filterOptions[0], "to_dict"): + filterOptions = [x.to_dict() for x in filterOptions] + exceptionOptions = self.exceptionOptions + if exceptionOptions and hasattr(exceptionOptions[0], "to_dict"): + exceptionOptions = [x.to_dict() for x in exceptionOptions] dct = { - 'breakpoints': [FunctionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, + 'filters': filters, } + if filterOptions is not None: + dct['filterOptions'] = [ExceptionFilterOptions.update_dict_ids_to_dap(o) for o in filterOptions] if (update_ids_to_dap and filterOptions) else filterOptions + if exceptionOptions is not None: + dct['exceptionOptions'] = [ExceptionOptions.update_dict_ids_to_dap(o) for o in exceptionOptions] if (update_ids_to_dap and exceptionOptions) else exceptionOptions dct.update(self.kwargs) return dct -@register_response('setFunctionBreakpoints') +@register_response('setExceptionBreakpoints') @register -class SetFunctionBreakpointsResponse(BaseSchema): +class SetExceptionBreakpointsResponse(BaseSchema): """ - Response to 'setFunctionBreakpoints' request. - - Returned is information about each breakpoint created by this request. + Response to 'setExceptionBreakpoints' request. This is just an acknowledgement, so no body field is + required. Note: automatically generated code. Do not edit manually. """ @@ -4252,26 +4955,23 @@ class SetFunctionBreakpointsResponse(BaseSchema): ] }, "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." - } - }, - "required": [ - "breakpoints" - ] + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is true and optional error details if success is false." } } - __refs__ = set(['body']) + __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string type: :param integer request_seq: Sequence number of the corresponding request. @@ -4279,22 +4979,19 @@ def __init__(self, request_seq, success, command, body, seq=-1, message=None, up If true, the request was successful and the 'body' attribute may contain the result of the request. If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). :param string command: The command requested. - :param SetFunctionBreakpointsResponseBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. :param string message: Contains the raw error in short form if 'success' is false. This raw error might be interpreted by the frontend and is not shown in the UI. Some predefined values exist. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and optional error details if success is false. """ self.type = 'response' self.request_seq = request_seq self.success = success self.command = command - if body is None: - self.body = SetFunctionBreakpointsResponseBody() - else: - self.body = SetFunctionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetFunctionBreakpointsResponseBody else body self.seq = seq self.message = message + self.body = body self.kwargs = kwargs @@ -4303,29 +5000,31 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un request_seq = self.request_seq success = self.success command = self.command - body = self.body seq = self.seq message = self.message + body = self.body dct = { 'type': type, 'request_seq': request_seq, 'success': success, 'command': command, - 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), 'seq': seq, } if message is not None: dct['message'] = message + if body is not None: + dct['body'] = body dct.update(self.kwargs) return dct -@register_request('setExceptionBreakpoints') +@register_request('dataBreakpointInfo') @register -class SetExceptionBreakpointsRequest(BaseSchema): +class DataBreakpointInfoRequest(BaseSchema): """ - The request configures the debuggers response to thrown exceptions. If an exception is configured to - break, a 'stopped' event is fired (with reason 'exception'). + Obtains information on a possible data breakpoint that could be set on an expression or variable. + + Clients should only call this request if the capability 'supportsDataBreakpoints' is true. Note: automatically generated code. Do not edit manually. """ @@ -4344,11 +5043,11 @@ class SetExceptionBreakpointsRequest(BaseSchema): "command": { "type": "string", "enum": [ - "setExceptionBreakpoints" + "dataBreakpointInfo" ] }, "arguments": { - "type": "SetExceptionBreakpointsArguments" + "type": "DataBreakpointInfoArguments" } } __refs__ = set(['arguments']) @@ -4359,15 +5058,15 @@ def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # n """ :param string type: :param string command: - :param SetExceptionBreakpointsArguments arguments: + :param DataBreakpointInfoArguments arguments: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ self.type = 'request' - self.command = 'setExceptionBreakpoints' + self.command = 'dataBreakpointInfo' if arguments is None: - self.arguments = SetExceptionBreakpointsArguments() + self.arguments = DataBreakpointInfoArguments() else: - self.arguments = SetExceptionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetExceptionBreakpointsArguments else arguments + self.arguments = DataBreakpointInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != DataBreakpointInfoArguments else arguments self.seq = seq self.kwargs = kwargs @@ -4388,68 +5087,72 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register -class SetExceptionBreakpointsArguments(BaseSchema): +class DataBreakpointInfoArguments(BaseSchema): """ - Arguments for 'setExceptionBreakpoints' request. + Arguments for 'dataBreakpointInfo' request. Note: automatically generated code. Do not edit manually. """ __props__ = { - "filters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "IDs of checked exception options. The set of IDs is returned via the 'exceptionBreakpointFilters' capability." + "variablesReference": { + "type": "integer", + "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." }, - "exceptionOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionOptions" - }, - "description": "Configuration options for selected exceptions." + "name": { + "type": "string", + "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variableReference isn\u2019t provided, this can be an expression." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, filters, exceptionOptions=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, name, variablesReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param array filters: IDs of checked exception options. The set of IDs is returned via the 'exceptionBreakpointFilters' capability. - :param array exceptionOptions: Configuration options for selected exceptions. + :param string name: The name of the Variable's child to obtain data breakpoint information for. + If variableReference isn’t provided, this can be an expression. + :param integer variablesReference: Reference to the Variable container if the data breakpoint is requested for a child of the container. """ - self.filters = filters - self.exceptionOptions = exceptionOptions - if update_ids_from_dap and self.exceptionOptions: - for o in self.exceptionOptions: - ExceptionOptions.update_dict_ids_from_dap(o) + self.name = name + self.variablesReference = variablesReference + if update_ids_from_dap: + self.variablesReference = self._translate_id_from_dap(self.variablesReference) self.kwargs = kwargs - + + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) + return dct def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - filters = self.filters - if filters and hasattr(filters[0], "to_dict"): - filters = [x.to_dict() for x in filters] - exceptionOptions = self.exceptionOptions - if exceptionOptions and hasattr(exceptionOptions[0], "to_dict"): - exceptionOptions = [x.to_dict() for x in exceptionOptions] + name = self.name + variablesReference = self.variablesReference + if update_ids_to_dap: + if variablesReference is not None: + variablesReference = self._translate_id_to_dap(variablesReference) dct = { - 'filters': filters, + 'name': name, } - if exceptionOptions is not None: - dct['exceptionOptions'] = [ExceptionOptions.update_dict_ids_to_dap(o) for o in exceptionOptions] if (update_ids_to_dap and exceptionOptions) else exceptionOptions + if variablesReference is not None: + dct['variablesReference'] = variablesReference dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if 'variablesReference' in dct: + dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct -@register_response('setExceptionBreakpoints') +@register_response('dataBreakpointInfo') @register -class SetExceptionBreakpointsResponse(BaseSchema): +class DataBreakpointInfoResponse(BaseSchema): """ - Response to 'setExceptionBreakpoints' request. This is just an acknowledgement, so no body field is - required. + Response to 'dataBreakpointInfo' request. Note: automatically generated code. Do not edit manually. """ @@ -4488,23 +5191,42 @@ class SetExceptionBreakpointsResponse(BaseSchema): ] }, "body": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Contains request result if success is true and optional error details if success is false." + "type": "object", + "properties": { + "dataId": { + "type": [ + "string", + "null" + ], + "description": "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." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." + } + }, + "required": [ + "dataId", + "description" + ] } } - __refs__ = set() + __refs__ = set(['body']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, request_seq, success, command, seq=-1, message=None, body=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, request_seq, success, command, body, seq=-1, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string type: :param integer request_seq: Sequence number of the corresponding request. @@ -4512,19 +5234,22 @@ def __init__(self, request_seq, success, command, seq=-1, message=None, body=Non If true, the request was successful and the 'body' attribute may contain the result of the request. If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). :param string command: The command requested. + :param DataBreakpointInfoResponseBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. :param string message: Contains the raw error in short form if 'success' is false. This raw error might be interpreted by the frontend and is not shown in the UI. Some predefined values exist. - :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] body: Contains request result if success is true and optional error details if success is false. """ self.type = 'response' self.request_seq = request_seq self.success = success self.command = command + if body is None: + self.body = DataBreakpointInfoResponseBody() + else: + self.body = DataBreakpointInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != DataBreakpointInfoResponseBody else body self.seq = seq self.message = message - self.body = body self.kwargs = kwargs @@ -4533,29 +5258,34 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un request_seq = self.request_seq success = self.success command = self.command + body = self.body seq = self.seq message = self.message - body = self.body dct = { 'type': type, 'request_seq': request_seq, 'success': success, 'command': command, + 'body': body.to_dict(update_ids_to_dap=update_ids_to_dap), 'seq': seq, } if message is not None: dct['message'] = message - if body is not None: - dct['body'] = body dct.update(self.kwargs) return dct -@register_request('dataBreakpointInfo') +@register_request('setDataBreakpoints') @register -class DataBreakpointInfoRequest(BaseSchema): +class SetDataBreakpointsRequest(BaseSchema): """ - Obtains information on a possible data breakpoint that could be set on an expression or variable. + Replaces all existing data breakpoints with new data breakpoints. + + To clear all data breakpoints, specify an empty array. + + When a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated. + + Clients should only call this request if the capability 'supportsDataBreakpoints' is true. Note: automatically generated code. Do not edit manually. """ @@ -4574,11 +5304,11 @@ class DataBreakpointInfoRequest(BaseSchema): "command": { "type": "string", "enum": [ - "dataBreakpointInfo" + "setDataBreakpoints" ] }, "arguments": { - "type": "DataBreakpointInfoArguments" + "type": "SetDataBreakpointsArguments" } } __refs__ = set(['arguments']) @@ -4589,15 +5319,15 @@ def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # n """ :param string type: :param string command: - :param DataBreakpointInfoArguments arguments: + :param SetDataBreakpointsArguments arguments: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ self.type = 'request' - self.command = 'dataBreakpointInfo' + self.command = 'setDataBreakpoints' if arguments is None: - self.arguments = DataBreakpointInfoArguments() + self.arguments = SetDataBreakpointsArguments() else: - self.arguments = DataBreakpointInfoArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != DataBreakpointInfoArguments else arguments + self.arguments = SetDataBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetDataBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs @@ -4618,71 +5348,55 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register -class DataBreakpointInfoArguments(BaseSchema): +class SetDataBreakpointsArguments(BaseSchema): """ - Arguments for 'dataBreakpointInfo' request. + Arguments for 'setDataBreakpoints' request. Note: automatically generated code. Do not edit manually. """ __props__ = { - "variablesReference": { - "type": "integer", - "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." - }, - "name": { - "type": "string", - "description": "The name of the Variable's child to obtain data breakpoint information for. If variableReference isn\u2019t provided, this can be an expression." + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, name, variablesReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) - """ - :param string name: The name of the Variable's child to obtain data breakpoint information for. If variableReference isn’t provided, this can be an expression. - :param integer variablesReference: Reference to the Variable container if the data breakpoint is requested for a child of the container. + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - self.name = name - self.variablesReference = variablesReference - if update_ids_from_dap: - self.variablesReference = self._translate_id_from_dap(self.variablesReference) + :param array breakpoints: The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + DataBreakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs - - - @classmethod - def update_dict_ids_from_dap(cls, dct): - if 'variablesReference' in dct: - dct['variablesReference'] = cls._translate_id_from_dap(dct['variablesReference']) - return dct + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) - name = self.name - variablesReference = self.variablesReference - if update_ids_to_dap: - if variablesReference is not None: - variablesReference = self._translate_id_to_dap(variablesReference) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] dct = { - 'name': name, + 'breakpoints': [DataBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } - if variablesReference is not None: - dct['variablesReference'] = variablesReference dct.update(self.kwargs) - return dct - - @classmethod - def update_dict_ids_to_dap(cls, dct): - if 'variablesReference' in dct: - dct['variablesReference'] = cls._translate_id_to_dap(dct['variablesReference']) return dct -@register_response('dataBreakpointInfo') +@register_response('setDataBreakpoints') @register -class DataBreakpointInfoResponse(BaseSchema): +class SetDataBreakpointsResponse(BaseSchema): """ - Response to 'dataBreakpointInfo' request. + Response to 'setDataBreakpoints' request. + + Returned is information about each breakpoint created by this request. Note: automatically generated code. Do not edit manually. """ @@ -4723,32 +5437,16 @@ class DataBreakpointInfoResponse(BaseSchema): "body": { "type": "object", "properties": { - "dataId": { - "type": [ - "string", - "null" - ], - "description": "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." - }, - "description": { - "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." - }, - "accessTypes": { + "breakpoints": { "type": "array", "items": { - "$ref": "#/definitions/DataBreakpointAccessType" + "$ref": "#/definitions/Breakpoint" }, - "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." - }, - "canPersist": { - "type": "boolean", - "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." } }, "required": [ - "dataId", - "description" + "breakpoints" ] } } @@ -4764,7 +5462,7 @@ def __init__(self, request_seq, success, command, body, seq=-1, message=None, up If true, the request was successful and the 'body' attribute may contain the result of the request. If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). :param string command: The command requested. - :param DataBreakpointInfoResponseBody body: + :param SetDataBreakpointsResponseBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. :param string message: Contains the raw error in short form if 'success' is false. This raw error might be interpreted by the frontend and is not shown in the UI. @@ -4775,9 +5473,9 @@ def __init__(self, request_seq, success, command, body, seq=-1, message=None, up self.success = success self.command = command if body is None: - self.body = DataBreakpointInfoResponseBody() + self.body = SetDataBreakpointsResponseBody() else: - self.body = DataBreakpointInfoResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != DataBreakpointInfoResponseBody else body + self.body = SetDataBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetDataBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs @@ -4805,15 +5503,19 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct -@register_request('setDataBreakpoints') +@register_request('setInstructionBreakpoints') @register -class SetDataBreakpointsRequest(BaseSchema): +class SetInstructionBreakpointsRequest(BaseSchema): """ - Replaces all existing data breakpoints with new data breakpoints. + Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from + a diassembly window. - To clear all data breakpoints, specify an empty array. + To clear all instruction breakpoints, specify an empty array. - When a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated. + When an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is + generated. + + Clients should only call this request if the capability 'supportsInstructionBreakpoints' is true. Note: automatically generated code. Do not edit manually. """ @@ -4832,11 +5534,11 @@ class SetDataBreakpointsRequest(BaseSchema): "command": { "type": "string", "enum": [ - "setDataBreakpoints" + "setInstructionBreakpoints" ] }, "arguments": { - "type": "SetDataBreakpointsArguments" + "type": "SetInstructionBreakpointsArguments" } } __refs__ = set(['arguments']) @@ -4847,15 +5549,15 @@ def __init__(self, arguments, seq=-1, update_ids_from_dap=False, **kwargs): # n """ :param string type: :param string command: - :param SetDataBreakpointsArguments arguments: + :param SetInstructionBreakpointsArguments arguments: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. """ self.type = 'request' - self.command = 'setDataBreakpoints' + self.command = 'setInstructionBreakpoints' if arguments is None: - self.arguments = SetDataBreakpointsArguments() + self.arguments = SetInstructionBreakpointsArguments() else: - self.arguments = SetDataBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetDataBreakpointsArguments else arguments + self.arguments = SetInstructionBreakpointsArguments(update_ids_from_dap=update_ids_from_dap, **arguments) if arguments.__class__ != SetInstructionBreakpointsArguments else arguments self.seq = seq self.kwargs = kwargs @@ -4876,9 +5578,9 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register -class SetDataBreakpointsArguments(BaseSchema): +class SetInstructionBreakpointsArguments(BaseSchema): """ - Arguments for 'setDataBreakpoints' request. + Arguments for 'setInstructionBreakpoints' request Note: automatically generated code. Do not edit manually. """ @@ -4887,9 +5589,9 @@ class SetDataBreakpointsArguments(BaseSchema): "breakpoints": { "type": "array", "items": { - "$ref": "#/definitions/DataBreakpoint" + "$ref": "#/definitions/InstructionBreakpoint" }, - "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + "description": "The instruction references of the breakpoints" } } __refs__ = set() @@ -4898,12 +5600,12 @@ class SetDataBreakpointsArguments(BaseSchema): def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param array breakpoints: The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints. + :param array breakpoints: The instruction references of the breakpoints """ self.breakpoints = breakpoints if update_ids_from_dap and self.breakpoints: for o in self.breakpoints: - DataBreakpoint.update_dict_ids_from_dap(o) + InstructionBreakpoint.update_dict_ids_from_dap(o) self.kwargs = kwargs @@ -4912,19 +5614,17 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un if breakpoints and hasattr(breakpoints[0], "to_dict"): breakpoints = [x.to_dict() for x in breakpoints] dct = { - 'breakpoints': [DataBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, + 'breakpoints': [InstructionBreakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, } dct.update(self.kwargs) return dct -@register_response('setDataBreakpoints') +@register_response('setInstructionBreakpoints') @register -class SetDataBreakpointsResponse(BaseSchema): +class SetInstructionBreakpointsResponse(BaseSchema): """ - Response to 'setDataBreakpoints' request. - - Returned is information about each breakpoint created by this request. + Response to 'setInstructionBreakpoints' request Note: automatically generated code. Do not edit manually. """ @@ -4970,7 +5670,7 @@ class SetDataBreakpointsResponse(BaseSchema): "items": { "$ref": "#/definitions/Breakpoint" }, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." } }, "required": [ @@ -4990,7 +5690,7 @@ def __init__(self, request_seq, success, command, body, seq=-1, message=None, up If true, the request was successful and the 'body' attribute may contain the result of the request. If the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error'). :param string command: The command requested. - :param SetDataBreakpointsResponseBody body: + :param SetInstructionBreakpointsResponseBody body: :param integer seq: Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request. :param string message: Contains the raw error in short form if 'success' is false. This raw error might be interpreted by the frontend and is not shown in the UI. @@ -5001,9 +5701,9 @@ def __init__(self, request_seq, success, command, body, seq=-1, message=None, up self.success = success self.command = command if body is None: - self.body = SetDataBreakpointsResponseBody() + self.body = SetInstructionBreakpointsResponseBody() else: - self.body = SetDataBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetDataBreakpointsResponseBody else body + self.body = SetInstructionBreakpointsResponseBody(update_ids_from_dap=update_ids_from_dap, **body) if body.__class__ != SetInstructionBreakpointsResponseBody else body self.seq = seq self.message = message self.kwargs = kwargs @@ -5108,7 +5808,7 @@ class ContinueArguments(BaseSchema): __props__ = { "threadId": { "type": "integer", - "description": "Continue execution for the specified thread (if possible). If the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." + "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." } } __refs__ = set() @@ -5117,7 +5817,8 @@ class ContinueArguments(BaseSchema): def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param integer threadId: Continue execution for the specified thread (if possible). If the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true. + :param integer threadId: Continue execution for the specified thread (if possible). + If the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true. """ self.threadId = threadId if update_ids_from_dap: @@ -5196,7 +5897,7 @@ class ContinueResponse(BaseSchema): "properties": { "allThreadsContinued": { "type": "boolean", - "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead. If this attribute is missing a value of 'true' is assumed for backward compatibility." + "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." } } } @@ -5335,17 +6036,25 @@ class NextArguments(BaseSchema): "threadId": { "type": "integer", "description": "Execute 'next' for this thread." + }, + "granularity": { + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.", + "type": "SteppingGranularity" } } - __refs__ = set() + __refs__ = set(['granularity']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, threadId, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer threadId: Execute 'next' for this thread. + :param SteppingGranularity granularity: Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed. """ self.threadId = threadId + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs @@ -5359,12 +6068,15 @@ def update_dict_ids_from_dap(cls, dct): def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threadId = self.threadId + granularity = self.granularity if update_ids_to_dap: if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { 'threadId': threadId, } + if granularity is not None: + dct['granularity'] = granularity dct.update(self.kwargs) return dct @@ -5575,19 +6287,27 @@ class StepInArguments(BaseSchema): "targetId": { "type": "integer", "description": "Optional id of the target to step into." + }, + "granularity": { + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.", + "type": "SteppingGranularity" } } - __refs__ = set() + __refs__ = set(['granularity']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, threadId, targetId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, threadId, targetId=None, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer threadId: Execute 'stepIn' for this thread. :param integer targetId: Optional id of the target to step into. + :param SteppingGranularity granularity: Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed. """ self.threadId = threadId self.targetId = targetId + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs @@ -5602,6 +6322,7 @@ def update_dict_ids_from_dap(cls, dct): def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threadId = self.threadId targetId = self.targetId + granularity = self.granularity if update_ids_to_dap: if threadId is not None: threadId = self._translate_id_to_dap(threadId) @@ -5610,6 +6331,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un } if targetId is not None: dct['targetId'] = targetId + if granularity is not None: + dct['granularity'] = granularity dct.update(self.kwargs) return dct @@ -5807,17 +6530,25 @@ class StepOutArguments(BaseSchema): "threadId": { "type": "integer", "description": "Execute 'stepOut' for this thread." + }, + "granularity": { + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.", + "type": "SteppingGranularity" } } - __refs__ = set() + __refs__ = set(['granularity']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, threadId, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer threadId: Execute 'stepOut' for this thread. + :param SteppingGranularity granularity: Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed. """ self.threadId = threadId + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs @@ -5831,12 +6562,15 @@ def update_dict_ids_from_dap(cls, dct): def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threadId = self.threadId + granularity = self.granularity if update_ids_to_dap: if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { 'threadId': threadId, } + if granularity is not None: + dct['granularity'] = granularity dct.update(self.kwargs) return dct @@ -5960,8 +6694,9 @@ class StepBackRequest(BaseSchema): The request starts the debuggee to run one step backwards. The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the - step has completed. Clients should only call this request if the capability 'supportsStepBack' is - true. + step has completed. + + Clients should only call this request if the capability 'supportsStepBack' is true. Note: automatically generated code. Do not edit manually. """ @@ -6035,17 +6770,25 @@ class StepBackArguments(BaseSchema): "threadId": { "type": "integer", "description": "Execute 'stepBack' for this thread." + }, + "granularity": { + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.", + "type": "SteppingGranularity" } } - __refs__ = set() + __refs__ = set(['granularity']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, threadId, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, threadId, granularity=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param integer threadId: Execute 'stepBack' for this thread. + :param SteppingGranularity granularity: Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed. """ self.threadId = threadId + if granularity is not None: + assert granularity in SteppingGranularity.VALID_VALUES + self.granularity = granularity if update_ids_from_dap: self.threadId = self._translate_id_from_dap(self.threadId) self.kwargs = kwargs @@ -6059,12 +6802,15 @@ def update_dict_ids_from_dap(cls, dct): def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) threadId = self.threadId + granularity = self.granularity if update_ids_to_dap: if threadId is not None: threadId = self._translate_id_to_dap(threadId) dct = { 'threadId': threadId, } + if granularity is not None: + dct['granularity'] = granularity dct.update(self.kwargs) return dct @@ -6185,8 +6931,9 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class ReverseContinueRequest(BaseSchema): """ - The request starts the debuggee to run backward. Clients should only call this request if the - capability 'supportsStepBack' is true. + The request starts the debuggee to run backward. + + Clients should only call this request if the capability 'supportsStepBack' is true. Note: automatically generated code. Do not edit manually. """ @@ -6415,6 +7162,8 @@ class RestartFrameRequest(BaseSchema): The debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed. + + Clients should only call this request if the capability 'supportsRestartFrame' is true. Note: automatically generated code. Do not edit manually. """ @@ -6645,6 +7394,9 @@ class GotoRequest(BaseSchema): The code between the current location and the goto target is not executed but skipped. The debug adapter first sends the response and then a 'stopped' event with reason 'goto'. + + Clients should only call this request if the capability 'supportsGotoTargetsRequest' is true + (because only then goto targets exist that can be passed as arguments). Note: automatically generated code. Do not edit manually. """ @@ -7103,7 +7855,16 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class StackTraceRequest(BaseSchema): """ - The request returns a stacktrace from the current execution state. + The request returns a stacktrace from the current execution state of a given thread. + + A client can request all stack frames by omitting the startFrame and levels arguments. For + performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' + capability 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 less frames than requested, which is an + indication that the end of the stack has been reached. Note: automatically generated code. Do not edit manually. """ @@ -7187,7 +7948,7 @@ class StackTraceArguments(BaseSchema): "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." }, "format": { - "description": "Specifies details on how to format the stack frames.", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.", "type": "StackFrameFormat" } } @@ -7201,6 +7962,7 @@ def __init__(self, threadId, startFrame=None, levels=None, format=None, update_i :param integer startFrame: The index of the first frame to return; if omitted frames start at 0. :param integer levels: The maximum number of frames to return. If levels is not specified or 0, all frames are returned. :param StackFrameFormat format: Specifies details on how to format the stack frames. + The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true. """ self.threadId = threadId self.startFrame = startFrame @@ -7301,7 +8063,7 @@ class StackTraceResponse(BaseSchema): }, "totalFrames": { "type": "integer", - "description": "The total number of frames available." + "description": "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." } }, "required": [ @@ -7689,7 +8451,7 @@ class VariablesArguments(BaseSchema): "description": "The number of variables to return. If count is missing or 0, all variables are returned." }, "format": { - "description": "Specifies details on how to format the Variable values.", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.", "type": "ValueFormat" } } @@ -7704,6 +8466,7 @@ def __init__(self, variablesReference, filter=None, start=None, count=None, form :param integer start: The index of the first variable to return; if omitted children start at 0. :param integer count: The number of variables to return. If count is missing or 0, all variables are returned. :param ValueFormat format: Specifies details on how to format the Variable values. + The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true. """ self.variablesReference = variablesReference self.filter = filter @@ -7869,7 +8632,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class SetVariableRequest(BaseSchema): """ - Set the variable with the given name in the variable container to a new value. + Set the variable with the given name in the variable container to a new value. Clients should only + call this request if the capability 'supportsSetVariable' is true. Note: automatically generated code. Do not edit manually. """ @@ -8066,15 +8830,15 @@ class SetVariableResponse(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } }, "required": [ @@ -8216,7 +8980,7 @@ class SourceArguments(BaseSchema): }, "sourceReference": { "type": "integer", - "description": "The reference to the source. This is the same as source.sourceReference. This is provided for backward compatibility since old backends do not understand the 'source' attribute." + "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." } } __refs__ = set(['source']) @@ -8225,7 +8989,8 @@ class SourceArguments(BaseSchema): def __init__(self, sourceReference, source=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param integer sourceReference: The reference to the source. This is the same as source.sourceReference. This is provided for backward compatibility since old backends do not understand the 'source' attribute. + :param integer sourceReference: The reference to the source. This is the same as source.sourceReference. + This is provided for backward compatibility since old backends do not understand the 'source' attribute. :param Source source: Specifies the source content to load. Either source.path or source.sourceReference must be specified. """ self.sourceReference = sourceReference @@ -8549,6 +9314,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class TerminateThreadsRequest(BaseSchema): """ The request terminates the threads with the given ids. + + Clients should only call this request if the capability 'supportsTerminateThreadsRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -8762,8 +9529,10 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class ModulesRequest(BaseSchema): """ - Modules can be retrieved from the debug adapter with the ModulesRequest which can either return all + Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging. + + Clients should only call this request if the capability 'supportsModulesRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -8991,6 +9760,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class LoadedSourcesRequest(BaseSchema): """ Retrieves the set of all sources currently loaded by the debugged process. + + Clients should only call this request if the capability 'supportsLoadedSourcesRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -9282,17 +10053,19 @@ class EvaluateArguments(BaseSchema): "_enum": [ "watch", "repl", - "hover" + "hover", + "clipboard" ], "enumDescriptions": [ "evaluate is run in a watch.", "evaluate is run from REPL console.", - "evaluate is run from a data hover." + "evaluate is run from a data hover.", + "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." ], "description": "The context in which the evaluate request is run." }, "format": { - "description": "Specifies details on how to format the Evaluate result.", + "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true.", "type": "ValueFormat" } } @@ -9306,6 +10079,7 @@ def __init__(self, expression, frameId=None, context=None, format=None, update_i :param integer frameId: Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. :param string context: The context in which the evaluate request is run. :param ValueFormat format: Specifies details on how to format the Evaluate result. + The attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true. """ self.expression = expression self.frameId = frameId @@ -9403,7 +10177,7 @@ class EvaluateResponse(BaseSchema): }, "type": { "type": "string", - "description": "The optional type of the evaluate result." + "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", @@ -9411,19 +10185,19 @@ class EvaluateResponse(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "Memory reference to a location appropriate for this result. For pointer type eval results, this is generally a reference to the memory address contained in the pointer." + "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." } }, "required": [ @@ -9493,6 +10267,8 @@ class SetExpressionRequest(BaseSchema): l-value. The expressions have access to any variables and arguments that are in scope of the specified frame. + + Clients should only call this request if the capability 'supportsSetExpression' is true. Note: automatically generated code. Do not edit manually. """ @@ -9686,7 +10462,7 @@ class SetExpressionResponse(BaseSchema): }, "type": { "type": "string", - "description": "The optional type of the value." + "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "$ref": "#/definitions/VariablePresentationHint", @@ -9694,15 +10470,15 @@ class SetExpressionResponse(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } }, "required": [ @@ -9773,6 +10549,8 @@ class StepInTargetsRequest(BaseSchema): The StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true. + + Clients should only call this request if the capability 'supportsStepInTargetsRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -10005,8 +10783,7 @@ class GotoTargetsRequest(BaseSchema): These targets can be used in the 'goto' request. - The GotoTargets request may only be called if the 'supportsGotoTargetsRequest' capability exists and - is true. + Clients should only call this request if the capability 'supportsGotoTargetsRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -10240,8 +11017,7 @@ class CompletionsRequest(BaseSchema): """ Returns a list of possible completions for a given caret position and text. - The CompletionsRequest may only be called if the 'supportsCompletionsRequest' capability exists and - is true. + Clients should only call this request if the capability 'supportsCompletionsRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -10497,6 +11273,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class ExceptionInfoRequest(BaseSchema): """ Retrieves the details of the exception that caused this event to be raised. + + Clients should only call this request if the capability 'supportsExceptionInfoRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -10736,6 +11514,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class ReadMemoryRequest(BaseSchema): """ Reads bytes from memory at the provided location. + + Clients should only call this request if the capability 'supportsReadMemoryRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -10896,11 +11676,11 @@ class ReadMemoryResponse(BaseSchema): "properties": { "address": { "type": "string", - "description": "The address of the first byte of data returned. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." }, "unreadableBytes": { "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." }, "data": { "type": "string", @@ -10971,6 +11751,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class DisassembleRequest(BaseSchema): """ Disassembles code stored at the provided location. + + Clients should only call this request if the capability 'supportsDisassembleRequest' is true. Note: automatically generated code. Do not edit manually. """ @@ -11055,7 +11837,7 @@ class DisassembleArguments(BaseSchema): }, "instructionCount": { "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset. An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." }, "resolveSymbols": { "type": "boolean", @@ -11069,7 +11851,8 @@ class DisassembleArguments(BaseSchema): def __init__(self, memoryReference, instructionCount, offset=None, instructionOffset=None, resolveSymbols=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string memoryReference: Memory reference to the base location containing the instructions to disassemble. - :param integer instructionCount: Number of instructions to disassemble starting at the specified location and offset. An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. + :param integer instructionCount: Number of instructions to disassemble starting at the specified location and offset. + An adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value. :param integer offset: Optional offset (in bytes) to be applied to the reference location before disassembling. Can be negative. :param integer instructionOffset: Optional offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative. :param boolean resolveSymbols: If true, the adapter should attempt to resolve memory addresses and other values to symbolic names. @@ -11248,7 +12031,7 @@ class Capabilities(BaseSchema): "items": { "$ref": "#/definitions/ExceptionBreakpointsFilter" }, - "description": "Available filters or options for the setExceptionBreakpoints request." + "description": "Available exception filter options for the 'setExceptionBreakpoints' request." }, "supportsStepBack": { "type": "boolean", @@ -11321,7 +12104,7 @@ class Capabilities(BaseSchema): }, "supportsDelayedStackTraceLoading": { "type": "boolean", - "description": "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." + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." }, "supportsLoadedSourcesRequest": { "type": "boolean", @@ -11362,20 +12145,36 @@ class Capabilities(BaseSchema): "supportsBreakpointLocationsRequest": { "type": "boolean", "description": "The debug adapter supports the 'breakpointLocations' request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakpoints=None, supportsConditionalBreakpoints=None, supportsHitConditionalBreakpoints=None, supportsEvaluateForHovers=None, exceptionBreakpointFilters=None, supportsStepBack=None, supportsSetVariable=None, supportsRestartFrame=None, supportsGotoTargetsRequest=None, supportsStepInTargetsRequest=None, supportsCompletionsRequest=None, completionTriggerCharacters=None, supportsModulesRequest=None, additionalModuleColumns=None, supportedChecksumAlgorithms=None, supportsRestartRequest=None, supportsExceptionOptions=None, supportsValueFormattingOptions=None, supportsExceptionInfoRequest=None, supportTerminateDebuggee=None, supportsDelayedStackTraceLoading=None, supportsLoadedSourcesRequest=None, supportsLogPoints=None, supportsTerminateThreadsRequest=None, supportsSetExpression=None, supportsTerminateRequest=None, supportsDataBreakpoints=None, supportsReadMemoryRequest=None, supportsDisassembleRequest=None, supportsCancelRequest=None, supportsBreakpointLocationsRequest=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakpoints=None, supportsConditionalBreakpoints=None, supportsHitConditionalBreakpoints=None, supportsEvaluateForHovers=None, exceptionBreakpointFilters=None, supportsStepBack=None, supportsSetVariable=None, supportsRestartFrame=None, supportsGotoTargetsRequest=None, supportsStepInTargetsRequest=None, supportsCompletionsRequest=None, completionTriggerCharacters=None, supportsModulesRequest=None, additionalModuleColumns=None, supportedChecksumAlgorithms=None, supportsRestartRequest=None, supportsExceptionOptions=None, supportsValueFormattingOptions=None, supportsExceptionInfoRequest=None, supportTerminateDebuggee=None, supportsDelayedStackTraceLoading=None, supportsLoadedSourcesRequest=None, supportsLogPoints=None, supportsTerminateThreadsRequest=None, supportsSetExpression=None, supportsTerminateRequest=None, supportsDataBreakpoints=None, supportsReadMemoryRequest=None, supportsDisassembleRequest=None, supportsCancelRequest=None, supportsBreakpointLocationsRequest=None, supportsClipboardContext=None, supportsSteppingGranularity=None, supportsInstructionBreakpoints=None, supportsExceptionFilterOptions=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param boolean supportsConfigurationDoneRequest: The debug adapter supports the 'configurationDone' request. :param boolean supportsFunctionBreakpoints: The debug adapter supports function breakpoints. :param boolean supportsConditionalBreakpoints: The debug adapter supports conditional breakpoints. :param boolean supportsHitConditionalBreakpoints: The debug adapter supports breakpoints that break execution after a specified number of hits. :param boolean supportsEvaluateForHovers: The debug adapter supports a (side effect free) evaluate request for data hovers. - :param array exceptionBreakpointFilters: Available filters or options for the setExceptionBreakpoints request. + :param array exceptionBreakpointFilters: Available exception filter options for the 'setExceptionBreakpoints' request. :param boolean supportsStepBack: The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests. :param boolean supportsSetVariable: The debug adapter supports setting a variable to a value. :param boolean supportsRestartFrame: The debug adapter supports restarting a frame. @@ -11391,7 +12190,7 @@ def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakp :param boolean supportsValueFormattingOptions: The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest. :param boolean supportsExceptionInfoRequest: The debug adapter supports the 'exceptionInfo' request. :param boolean supportTerminateDebuggee: The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request. - :param boolean supportsDelayedStackTraceLoading: 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. + :param boolean supportsDelayedStackTraceLoading: The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported. :param boolean supportsLoadedSourcesRequest: The debug adapter supports the 'loadedSources' request. :param boolean supportsLogPoints: The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint. :param boolean supportsTerminateThreadsRequest: The debug adapter supports the 'terminateThreads' request. @@ -11402,6 +12201,10 @@ def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakp :param boolean supportsDisassembleRequest: The debug adapter supports the 'disassemble' request. :param boolean supportsCancelRequest: The debug adapter supports the 'cancel' request. :param boolean supportsBreakpointLocationsRequest: The debug adapter supports the 'breakpointLocations' request. + :param boolean supportsClipboardContext: The debug adapter supports the 'clipboard' context value in the 'evaluate' request. + :param boolean supportsSteppingGranularity: The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests. + :param boolean supportsInstructionBreakpoints: The debug adapter supports adding breakpoints based on instruction references. + :param boolean supportsExceptionFilterOptions: The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request. """ self.supportsConfigurationDoneRequest = supportsConfigurationDoneRequest self.supportsFunctionBreakpoints = supportsFunctionBreakpoints @@ -11444,6 +12247,10 @@ def __init__(self, supportsConfigurationDoneRequest=None, supportsFunctionBreakp self.supportsDisassembleRequest = supportsDisassembleRequest self.supportsCancelRequest = supportsCancelRequest self.supportsBreakpointLocationsRequest = supportsBreakpointLocationsRequest + self.supportsClipboardContext = supportsClipboardContext + self.supportsSteppingGranularity = supportsSteppingGranularity + self.supportsInstructionBreakpoints = supportsInstructionBreakpoints + self.supportsExceptionFilterOptions = supportsExceptionFilterOptions self.kwargs = kwargs @@ -11488,6 +12295,10 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un supportsDisassembleRequest = self.supportsDisassembleRequest supportsCancelRequest = self.supportsCancelRequest supportsBreakpointLocationsRequest = self.supportsBreakpointLocationsRequest + supportsClipboardContext = self.supportsClipboardContext + supportsSteppingGranularity = self.supportsSteppingGranularity + supportsInstructionBreakpoints = self.supportsInstructionBreakpoints + supportsExceptionFilterOptions = self.supportsExceptionFilterOptions dct = { } if supportsConfigurationDoneRequest is not None: @@ -11554,6 +12365,14 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un dct['supportsCancelRequest'] = supportsCancelRequest if supportsBreakpointLocationsRequest is not None: dct['supportsBreakpointLocationsRequest'] = supportsBreakpointLocationsRequest + if supportsClipboardContext is not None: + dct['supportsClipboardContext'] = supportsClipboardContext + if supportsSteppingGranularity is not None: + dct['supportsSteppingGranularity'] = supportsSteppingGranularity + if supportsInstructionBreakpoints is not None: + dct['supportsInstructionBreakpoints'] = supportsInstructionBreakpoints + if supportsExceptionFilterOptions is not None: + dct['supportsExceptionFilterOptions'] = supportsExceptionFilterOptions dct.update(self.kwargs) return dct @@ -11561,8 +12380,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un @register class ExceptionBreakpointsFilter(BaseSchema): """ - An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are - dealt with. + An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions + are dealt with. Note: automatically generated code. Do not edit manually. """ @@ -11570,30 +12389,36 @@ class ExceptionBreakpointsFilter(BaseSchema): __props__ = { "filter": { "type": "string", - "description": "The internal ID of the filter. This value is passed to the setExceptionBreakpoints request." + "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." }, "label": { "type": "string", - "description": "The name of the filter. This will be shown in the UI." + "description": "The name of the filter option. This will be shown in the UI." }, "default": { "type": "boolean", - "description": "Initial value of the filter. If not specified a value 'false' is assumed." + "description": "Initial value of the filter option. If not specified a value 'false' is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." } } __refs__ = set() __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, filter, label, default=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, filter, label, default=None, supportsCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string filter: The internal ID of the filter. This value is passed to the setExceptionBreakpoints request. - :param string label: The name of the filter. This will be shown in the UI. - :param boolean default: Initial value of the filter. If not specified a value 'false' is assumed. + :param string filter: The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request. + :param string label: The name of the filter option. This will be shown in the UI. + :param boolean default: Initial value of the filter option. If not specified a value 'false' is assumed. + :param boolean supportsCondition: Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set. """ self.filter = filter self.label = label self.default = default + self.supportsCondition = supportsCondition self.kwargs = kwargs @@ -11601,12 +12426,15 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un filter = self.filter # noqa (assign to builtin) label = self.label default = self.default + supportsCondition = self.supportsCondition dct = { 'filter': filter, 'label': label, } if default is not None: dct['default'] = default + if supportsCondition is not None: + dct['supportsCondition'] = supportsCondition dct.update(self.kwargs) return dct @@ -11848,7 +12676,9 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class ColumnDescriptor(BaseSchema): """ A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to - format it, and what the column's label should be. + format it, + + and what the column's label should be. It is only used if the underlying UI actually supports this level of customization. @@ -12031,8 +12861,10 @@ def update_dict_ids_to_dap(cls, dct): @register class Source(BaseSchema): """ - A Source is a descriptor for source code. It is returned from the debug adapter as part of a - StackFrame and it is used by clients when specifying breakpoints. + A Source is a descriptor for source code. + + It is returned from the debug adapter as part of a StackFrame and it is used by clients when + specifying breakpoints. Note: automatically generated code. Do not edit manually. """ @@ -12040,19 +12872,19 @@ class Source(BaseSchema): __props__ = { "name": { "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional." + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." }, "path": { "type": "string", - "description": "The path of the source to be shown in the UI. It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." }, "sourceReference": { "type": "integer", - "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "presentationHint": { "type": "string", - "description": "An optional hint for how to present the source in the UI. A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", + "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", "enum": [ "normal", "emphasize", @@ -12080,7 +12912,7 @@ class Source(BaseSchema): "object", "string" ], - "description": "Optional data that a debug adapter might want to loop through the client. The client should leave the data intact and persist it across sessions. The client should not interpret the data." + "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." }, "checksums": { "type": "array", @@ -12096,13 +12928,19 @@ class Source(BaseSchema): def __init__(self, name=None, path=None, sourceReference=None, presentationHint=None, origin=None, sources=None, adapterData=None, checksums=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string name: The short name of the source. Every source returned from the debug adapter has a name. When sending a source to the debug adapter this name is optional. - :param string path: The path of the source to be shown in the UI. It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0). - :param integer sourceReference: If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1). - :param string presentationHint: An optional hint for how to present the source in the UI. A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping. + :param string name: The short name of the source. Every source returned from the debug adapter has a name. + When sending a source to the debug adapter this name is optional. + :param string path: The path of the source to be shown in the UI. + It is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0). + :param integer sourceReference: If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). + A sourceReference is only valid for a session, so it must not be used to persist a source. + The value should be less than or equal to 2147483647 (2^31-1). + :param string presentationHint: An optional hint for how to present the source in the UI. + A value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping. :param string origin: The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc. :param array sources: An optional list of sources that are related to this source. These may be the source that generated this source. - :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] adapterData: Optional data that a debug adapter might want to loop through the client. The client should leave the data intact and persist it across sessions. The client should not interpret the data. + :param ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string'] adapterData: Optional data that a debug adapter might want to loop through the client. + The client should leave the data intact and persist it across sessions. The client should not interpret the data. :param array checksums: The checksums associated with this file. """ self.name = name @@ -12168,7 +13006,7 @@ class StackFrame(BaseSchema): __props__ = { "id": { "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads. This id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." }, "name": { "type": "string", @@ -12212,7 +13050,7 @@ class StackFrame(BaseSchema): "label", "subtle" ], - "description": "An optional hint for how to present this frame in the UI. A 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." + "description": "An optional hint for how to present this frame in the UI.\nA 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." } } __refs__ = set(['source']) @@ -12221,7 +13059,8 @@ class StackFrame(BaseSchema): def __init__(self, id, name, line, column, source=None, endLine=None, endColumn=None, instructionPointerReference=None, moduleId=None, presentationHint=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param integer id: An identifier for the stack frame. It must be unique across all threads. This id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe. + :param integer id: An identifier for the stack frame. It must be unique across all threads. + This id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe. :param string name: The name of the stack frame, typically a method name. :param integer line: The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored. :param integer column: The column within the line. If source is null or doesn't exist, column is 0 and must be ignored. @@ -12230,7 +13069,8 @@ def __init__(self, id, name, line, column, source=None, endLine=None, endColumn= :param integer endColumn: An optional end column of the range covered by the stack frame. :param string instructionPointerReference: Optional memory reference for the current instruction pointer in this frame. :param ['integer', 'string'] moduleId: The module associated with this frame, if any. - :param string presentationHint: An optional hint for how to present this frame in the UI. A 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. + :param string presentationHint: An optional hint for how to present this frame in the UI. + A 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. """ self.id = id self.name = name @@ -12488,7 +13328,7 @@ class Variable(BaseSchema): }, "type": { "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value." + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", @@ -12512,7 +13352,7 @@ class Variable(BaseSchema): }, "memoryReference": { "type": "string", - "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer." + "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." } } __refs__ = set(['presentationHint']) @@ -12525,6 +13365,7 @@ def __init__(self, name, value, variablesReference, type=None, presentationHint= :param string value: The variable's value. This can be a multi-line text, e.g. for a function the body of a function. :param integer variablesReference: If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. :param string type: The type of the variable's value. Typically shown in the UI when hovering over the value. + This attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request. :param VariablePresentationHint presentationHint: Properties of a variable that can be used to determine how to render the variable in the UI. :param string evaluateName: Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value. :param integer namedVariables: The number of named child variables. @@ -12532,6 +13373,7 @@ def __init__(self, name, value, variablesReference, type=None, presentationHint= :param integer indexedVariables: The number of indexed child variables. The client can use this optional information to present the children in a paged UI and fetch them in chunks. :param string memoryReference: Optional memory reference for the variable if the variable represents executable code, such as a function pointer. + This attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request. """ self.name = name self.value = value @@ -12632,7 +13474,7 @@ class VariablePresentationHint(BaseSchema): "Indicates that the object is an inner class.", "Indicates that the object is an interface.", "Indicates that the object is the most derived class.", - "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.", + "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", "Indicates that a data breakpoint is registered for the object." ] }, @@ -12788,15 +13630,15 @@ class SourceBreakpoint(BaseSchema): }, "condition": { "type": "string", - "description": "An optional expression for conditional breakpoints." + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." }, "logMessage": { "type": "string", - "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop) but log the message instead. Expressions within {} are interpolated." + "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." } } __refs__ = set() @@ -12808,8 +13650,13 @@ def __init__(self, line, column=None, condition=None, hitCondition=None, logMess :param integer line: The source line of the breakpoint or logpoint. :param integer column: An optional source column of the breakpoint. :param string condition: An optional expression for conditional breakpoints. - :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed. - :param string logMessage: If this attribute exists and is non-empty, the backend must not 'break' (stop) but log the message instead. Expressions within {} are interpolated. + It is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true. + :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. + The backend is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true. + :param string logMessage: If this attribute exists and is non-empty, the backend must not 'break' (stop) + but log the message instead. Expressions within {} are interpolated. + The attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true. """ self.line = line self.column = column @@ -12855,11 +13702,11 @@ class FunctionBreakpoint(BaseSchema): }, "condition": { "type": "string", - "description": "An optional expression for conditional breakpoints." + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." } } __refs__ = set() @@ -12870,7 +13717,10 @@ def __init__(self, name, condition=None, hitCondition=None, update_ids_from_dap= """ :param string name: The name of the function. :param string condition: An optional expression for conditional breakpoints. - :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed. + It is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true. + :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. + The backend is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true. """ self.name = name self.condition = condition @@ -12950,7 +13800,7 @@ class DataBreakpoint(BaseSchema): }, "hitCondition": { "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed." + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." } } __refs__ = set(['accessType']) @@ -12962,10 +13812,12 @@ def __init__(self, dataId, accessType=None, condition=None, hitCondition=None, u :param string dataId: An id representing the data. This id is returned from the dataBreakpointInfo request. :param DataBreakpointAccessType accessType: The access type of the data. :param string condition: An optional expression for conditional breakpoints. - :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. The backend is expected to interpret the expression as needed. + :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. + The backend is expected to interpret the expression as needed. """ self.dataId = dataId - assert accessType in DataBreakpointAccessType.VALID_VALUES + if accessType is not None: + assert accessType in DataBreakpointAccessType.VALID_VALUES self.accessType = accessType self.condition = condition self.hitCondition = hitCondition @@ -12990,10 +13842,78 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct +@register +class InstructionBreakpoint(BaseSchema): + """ + Properties of a breakpoint passed to the setInstructionBreakpoints request + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, instructionReference, offset=None, condition=None, hitCondition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string instructionReference: The instruction reference of the breakpoint. + This should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint. + :param integer offset: An optional offset from the instruction reference. + This can be negative. + :param string condition: An optional expression for conditional breakpoints. + It is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true. + :param string hitCondition: An optional expression that controls how many hits of the breakpoint are ignored. + The backend is expected to interpret the expression as needed. + The attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true. + """ + self.instructionReference = instructionReference + self.offset = offset + self.condition = condition + self.hitCondition = hitCondition + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + instructionReference = self.instructionReference + offset = self.offset + condition = self.condition + hitCondition = self.hitCondition + dct = { + 'instructionReference': instructionReference, + } + if offset is not None: + dct['offset'] = offset + if condition is not None: + dct['condition'] = condition + if hitCondition is not None: + dct['hitCondition'] = hitCondition + dct.update(self.kwargs) + return dct + + @register class Breakpoint(BaseSchema): """ - Information about a Breakpoint created in setBreakpoints or setFunctionBreakpoints. + Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, + setInstructionBreakpoints, or setDataBreakpoints. Note: automatically generated code. Do not edit manually. """ @@ -13009,7 +13929,7 @@ class Breakpoint(BaseSchema): }, "message": { "type": "string", - "description": "An optional message about the state of the breakpoint. This is shown to the user and can be used to explain why a breakpoint could not be verified." + "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." }, "source": { "description": "The source where the breakpoint is located.", @@ -13029,23 +13949,36 @@ class Breakpoint(BaseSchema): }, "endColumn": { "type": "integer", - "description": "An optional end column of the actual range covered by the breakpoint. If no end line is given, then the end column is assumed to be in the start line." + "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "An optional memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." } } __refs__ = set(['source']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, verified, id=None, message=None, source=None, line=None, column=None, endLine=None, endColumn=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, verified, id=None, message=None, source=None, line=None, column=None, endLine=None, endColumn=None, instructionReference=None, offset=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param boolean verified: If true breakpoint could be set (but not necessarily at the desired location). :param integer id: An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints. - :param string message: An optional message about the state of the breakpoint. This is shown to the user and can be used to explain why a breakpoint could not be verified. + :param string message: An optional message about the state of the breakpoint. + This is shown to the user and can be used to explain why a breakpoint could not be verified. :param Source source: The source where the breakpoint is located. :param integer line: The start line of the actual range covered by the breakpoint. :param integer column: An optional start column of the actual range covered by the breakpoint. :param integer endLine: An optional end line of the actual range covered by the breakpoint. - :param integer endColumn: An optional end column of the actual range covered by the breakpoint. If no end line is given, then the end column is assumed to be in the start line. + :param integer endColumn: An optional end column of the actual range covered by the breakpoint. + If no end line is given, then the end column is assumed to be in the start line. + :param string instructionReference: An optional memory reference to where the breakpoint is set. + :param integer offset: An optional offset from the instruction reference. + This can be negative. """ self.verified = verified self.id = id @@ -13058,6 +13991,8 @@ def __init__(self, verified, id=None, message=None, source=None, line=None, colu self.column = column self.endLine = endLine self.endColumn = endColumn + self.instructionReference = instructionReference + self.offset = offset self.kwargs = kwargs @@ -13070,6 +14005,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un column = self.column endLine = self.endLine endColumn = self.endColumn + instructionReference = self.instructionReference + offset = self.offset dct = { 'verified': verified, } @@ -13087,6 +14024,44 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un dct['endLine'] = endLine if endColumn is not None: dct['endColumn'] = endColumn + if instructionReference is not None: + dct['instructionReference'] = instructionReference + if offset is not None: + dct['offset'] = offset + dct.update(self.kwargs) + return dct + + +@register +class SteppingGranularity(BaseSchema): + """ + The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'. + + Note: automatically generated code. Do not edit manually. + """ + + STATEMENT = 'statement' + LINE = 'line' + INSTRUCTION = 'instruction' + + VALID_VALUES = set(['statement', 'line', 'instruction']) + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + + """ + + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = { + } dct.update(self.kwargs) return dct @@ -13256,13 +14231,21 @@ class CompletionItem(BaseSchema): "length": { "type": "integer", "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." } } __refs__ = set(['type']) __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, label, text=None, sortText=None, type=None, start=None, length=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, label, text=None, sortText=None, type=None, start=None, length=None, selectionStart=None, selectionLength=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string label: The label of this completion item. By default this is also the text that is inserted when selecting this completion. :param string text: If text is not falsy then it is inserted instead of the label. @@ -13272,14 +14255,23 @@ def __init__(self, label, text=None, sortText=None, type=None, start=None, lengt If missing the text is added at the location specified by the CompletionsRequest's 'column' attribute. :param integer length: This value determines how many characters are overwritten by the completion text. If missing the value 0 is assumed which results in the completion text being inserted. + :param integer selectionStart: Determines the start of the new selection after the text has been inserted (or replaced). + The start position must in the range 0 and length of the completion text. + If omitted the selection starts at the end of the completion text. + :param integer selectionLength: Determines the length of the new selection after the text has been inserted (or replaced). + The selection can not extend beyond the bounds of the completion text. + If omitted the length is assumed to be 0. """ self.label = label self.text = text self.sortText = sortText - assert type in CompletionItemType.VALID_VALUES + if type is not None: + assert type in CompletionItemType.VALID_VALUES self.type = type self.start = start self.length = length + self.selectionStart = selectionStart + self.selectionLength = selectionLength self.kwargs = kwargs @@ -13290,6 +14282,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un type = self.type # noqa (assign to builtin) start = self.start length = self.length + selectionStart = self.selectionStart + selectionLength = self.selectionLength dct = { 'label': label, } @@ -13303,6 +14297,10 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un dct['start'] = start if length is not None: dct['length'] = length + if selectionStart is not None: + dct['selectionStart'] = selectionStart + if selectionLength is not None: + dct['selectionLength'] = selectionLength dct.update(self.kwargs) return dct @@ -13420,7 +14418,8 @@ def __init__(self, algorithm, checksum, update_ids_from_dap=False, **kwargs): # :param ChecksumAlgorithm algorithm: The algorithm used to calculate this checksum. :param string checksum: Value of the checksum. """ - assert algorithm in ChecksumAlgorithm.VALID_VALUES + if algorithm is not None: + assert algorithm in ChecksumAlgorithm.VALID_VALUES self.algorithm = algorithm self.checksum = checksum self.kwargs = kwargs @@ -13572,6 +14571,52 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct +@register +class ExceptionFilterOptions(BaseSchema): + """ + An ExceptionFilterOptions is used to specify an exception filter together with a condition for the + setExceptionsFilter request. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, filterId, condition=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string filterId: ID of an exception filter returned by the 'exceptionBreakpointFilters' capability. + :param string condition: An optional expression for conditional exceptions. + The exception will break into the debugger if the result of the condition is true. + """ + self.filterId = filterId + self.condition = condition + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + filterId = self.filterId + condition = self.condition + dct = { + 'filterId': filterId, + } + if condition is not None: + dct['condition'] = condition + dct.update(self.kwargs) + return dct + + @register class ExceptionOptions(BaseSchema): """ @@ -13586,7 +14631,7 @@ class ExceptionOptions(BaseSchema): "items": { "$ref": "#/definitions/ExceptionPathSegment" }, - "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. By convention the first segment of the path is a category that is used to group exceptions in the UI." + "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." }, "breakMode": { "description": "Condition when a thrown exception should result in a break.", @@ -13600,9 +14645,11 @@ class ExceptionOptions(BaseSchema): def __init__(self, breakMode, path=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param ExceptionBreakMode breakMode: Condition when a thrown exception should result in a break. - :param array path: A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. By convention the first segment of the path is a category that is used to group exceptions in the UI. + :param array path: A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected. + By convention the first segment of the path is a category that is used to group exceptions in the UI. """ - assert breakMode in ExceptionBreakMode.VALID_VALUES + if breakMode is not None: + assert breakMode in ExceptionBreakMode.VALID_VALUES self.breakMode = breakMode self.path = path if update_ids_from_dap and self.path: @@ -13672,8 +14719,12 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un class ExceptionPathSegment(BaseSchema): """ An ExceptionPathSegment represents a segment in a path that is used to match leafs or nodes in a - tree of exceptions. If a segment consists of more than one name, it matches the names provided if - 'negate' is false or missing or it matches anything except the names provided if 'negate' is true. + tree of exceptions. + + If a segment consists of more than one name, it matches the names provided if 'negate' is false or + missing or + + it matches anything except the names provided if 'negate' is true. Note: automatically generated code. Do not edit manually. """ @@ -13834,7 +14885,7 @@ class DisassembledInstruction(BaseSchema): "description": "Name of the symbol that corresponds with the location of this instruction, if any." }, "location": { - "description": "Source location that corresponds to this instruction, if any. Should always be set (if available) on the first instruction returned, but can be omitted afterwards if this instruction maps to the same source file as the previous instruction.", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction.", "type": "Source" }, "line": { @@ -13864,7 +14915,9 @@ def __init__(self, address, instruction, instructionBytes=None, symbol=None, loc :param string instruction: Text representing the instruction and its operands, in an implementation-defined format. :param string instructionBytes: Optional raw bytes representing the instruction and its operands, in an implementation-defined format. :param string symbol: Name of the symbol that corresponds with the location of this instruction, if any. - :param Source location: Source location that corresponds to this instruction, if any. Should always be set (if available) on the first instruction returned, but can be omitted afterwards if this instruction maps to the same source file as the previous instruction. + :param Source location: Source location that corresponds to this instruction, if any. + Should always be set (if available) on the first instruction returned, + but can be omitted afterwards if this instruction maps to the same source file as the previous instruction. :param integer line: The line within the source location that corresponds to this instruction, if any. :param integer column: The column within the line that corresponds to this instruction, if any. :param integer endLine: The end line of the range that corresponds to this instruction, if any. @@ -13917,6 +14970,34 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct +@register +class InvalidatedAreas(BaseSchema): + """ + Logical areas that can be invalidated by the 'invalidated' event. + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = {} + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + + """ + + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + dct = { + } + dct.update(self.kwargs) + return dct + + @register_request('setDebuggerProperty') @register class SetDebuggerPropertyRequest(BaseSchema): @@ -15291,7 +16372,8 @@ class StoppedEventBody(BaseSchema): "entry", "goto", "function breakpoint", - "data breakpoint" + "data breakpoint", + "instruction breakpoint" ] }, "description": { @@ -15609,9 +16691,23 @@ class OutputEventBody(BaseSchema): "type": "string", "description": "The output to report." }, + "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 decreases 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. The value should be less than or equal to 2147483647 (2^31 - 1)." + "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. The value should be less than or equal to 2147483647 (2^31-1)." }, "source": { "description": "An optional source location where the output was produced.", @@ -15642,11 +16738,12 @@ class OutputEventBody(BaseSchema): __slots__ = list(__props__.keys()) + ['kwargs'] - def __init__(self, output, category=None, variablesReference=None, source=None, line=None, column=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + def __init__(self, output, category=None, group=None, variablesReference=None, source=None, line=None, column=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string output: The output to report. :param string category: The output category. If not specified, 'console' is assumed. - :param integer variablesReference: 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. The value should be less than or equal to 2147483647 (2^31 - 1). + :param string group: Support for keeping an output log organized by grouping related messages. + :param integer variablesReference: 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. The value should be less than or equal to 2147483647 (2^31-1). :param Source source: An optional source location where the output was produced. :param integer line: An optional source location line where the output was produced. :param integer column: An optional source location column where the output was produced. @@ -15654,6 +16751,7 @@ def __init__(self, output, category=None, variablesReference=None, source=None, """ self.output = output self.category = category + self.group = group self.variablesReference = variablesReference if source is None: self.source = Source() @@ -15676,6 +16774,7 @@ def update_dict_ids_from_dap(cls, dct): def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) output = self.output category = self.category + group = self.group variablesReference = self.variablesReference source = self.source line = self.line @@ -15689,6 +16788,8 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un } if category is not None: dct['category'] = category + if group is not None: + dct['group'] = group if variablesReference is not None: dct['variablesReference'] = variablesReference if source is not None: @@ -15981,6 +17082,266 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct +@register +class ProgressStartEventBody(BaseSchema): + """ + "body" of ProgressStartEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": { + "type": "string", + "description": "An ID that must 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": "Mandatory (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\nprogress 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 canceled 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": "Optional, more detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, progressId, title, requestId=None, cancellable=None, message=None, percentage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting. + IDs must be unique within a debug session. + :param string title: Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation. + :param integer requestId: 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. + If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter. + :param boolean cancellable: If true, the request that reports progress may be canceled with a 'cancel' request. + So this property basically controls whether the client should use UX that supports cancellation. + Clients that don't support cancellation are allowed to ignore the setting. + :param string message: Optional, more detailed progress message. + :param number percentage: Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. + """ + self.progressId = progressId + self.title = title + self.requestId = requestId + self.cancellable = cancellable + self.message = message + self.percentage = percentage + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + title = self.title + requestId = self.requestId + cancellable = self.cancellable + message = self.message + percentage = self.percentage + dct = { + 'progressId': progressId, + 'title': title, + } + if requestId is not None: + dct['requestId'] = requestId + if cancellable is not None: + dct['cancellable'] = cancellable + if message is not None: + dct['message'] = message + if percentage is not None: + dct['percentage'] = percentage + dct.update(self.kwargs) + return dct + + +@register +class ProgressUpdateEventBody(BaseSchema): + """ + "body" of ProgressUpdateEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'progressStart' event." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, progressId, message=None, percentage=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: The ID that was introduced in the initial 'progressStart' event. + :param string message: Optional, more detailed progress message. If omitted, the previous message (if any) is used. + :param number percentage: Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. + """ + self.progressId = progressId + self.message = message + self.percentage = percentage + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + message = self.message + percentage = self.percentage + dct = { + 'progressId': progressId, + } + if message is not None: + dct['message'] = message + if percentage is not None: + dct['percentage'] = percentage + dct.update(self.kwargs) + return dct + + +@register +class ProgressEndEventBody(BaseSchema): + """ + "body" of ProgressEndEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'ProgressStartEvent'." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, progressId, message=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param string progressId: The ID that was introduced in the initial 'ProgressStartEvent'. + :param string message: Optional, more detailed progress message. If omitted, the previous message (if any) is used. + """ + self.progressId = progressId + self.message = message + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + progressId = self.progressId + message = self.message + dct = { + 'progressId': progressId, + } + if message is not None: + dct['message'] = message + dct.update(self.kwargs) + return dct + + +@register +class InvalidatedEventBody(BaseSchema): + """ + "body" of InvalidatedEvent + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "areas": { + "type": "array", + "description": "Optional 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 honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand 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)." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, areas=None, threadId=None, stackFrameId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array areas: Optional 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 honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand the client should assume a single value 'all'. + :param integer threadId: If specified, the client only needs to refetch data related to this thread. + :param integer stackFrameId: If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored). + """ + self.areas = areas + if update_ids_from_dap and self.areas: + for o in self.areas: + InvalidatedAreas.update_dict_ids_from_dap(o) + self.threadId = threadId + self.stackFrameId = stackFrameId + if update_ids_from_dap: + self.threadId = self._translate_id_from_dap(self.threadId) + self.kwargs = kwargs + + + @classmethod + def update_dict_ids_from_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_from_dap(dct['threadId']) + return dct + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + areas = self.areas + if areas and hasattr(areas[0], "to_dict"): + areas = [x.to_dict() for x in areas] + threadId = self.threadId + stackFrameId = self.stackFrameId + if update_ids_to_dap: + if threadId is not None: + threadId = self._translate_id_to_dap(threadId) + dct = { + } + if areas is not None: + dct['areas'] = [InvalidatedAreas.update_dict_ids_to_dap(o) for o in areas] if (update_ids_to_dap and areas) else areas + if threadId is not None: + dct['threadId'] = threadId + if stackFrameId is not None: + dct['stackFrameId'] = stackFrameId + dct.update(self.kwargs) + return dct + + @classmethod + def update_dict_ids_to_dap(cls, dct): + if 'threadId' in dct: + dct['threadId'] = cls._translate_id_to_dap(dct['threadId']) + return dct + + @register class RunInTerminalRequestArgumentsEnv(BaseSchema): """ @@ -16020,11 +17381,11 @@ class RunInTerminalResponseBody(BaseSchema): __props__ = { "processId": { "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31 - 1)." + "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)." + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." } } __refs__ = set() @@ -16033,8 +17394,8 @@ class RunInTerminalResponseBody(BaseSchema): def __init__(self, processId=None, shellProcessId=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param integer processId: The process ID. The value should be less than or equal to 2147483647 (2^31 - 1). - :param integer shellProcessId: The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31 - 1). + :param integer processId: The process ID. The value should be less than or equal to 2147483647 (2^31-1). + :param integer shellProcessId: The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1). """ self.processId = processId self.shellProcessId = shellProcessId @@ -16111,7 +17472,7 @@ class SetBreakpointsResponseBody(BaseSchema): "items": { "$ref": "#/definitions/Breakpoint" }, - "description": "Information about the breakpoints. The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." } } __refs__ = set() @@ -16120,7 +17481,8 @@ class SetBreakpointsResponseBody(BaseSchema): def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param array breakpoints: Information about the breakpoints. The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments. + :param array breakpoints: Information about the breakpoints. + The array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments. """ self.breakpoints = breakpoints if update_ids_from_dap and self.breakpoints: @@ -16298,6 +17660,49 @@ def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be un return dct +@register +class SetInstructionBreakpointsResponseBody(BaseSchema): + """ + "body" of SetInstructionBreakpointsResponse + + Note: automatically generated code. Do not edit manually. + """ + + __props__ = { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + } + __refs__ = set() + + __slots__ = list(__props__.keys()) + ['kwargs'] + + def __init__(self, breakpoints, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) + """ + :param array breakpoints: Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array. + """ + self.breakpoints = breakpoints + if update_ids_from_dap and self.breakpoints: + for o in self.breakpoints: + Breakpoint.update_dict_ids_from_dap(o) + self.kwargs = kwargs + + + def to_dict(self, update_ids_to_dap=False): # noqa (update_ids_to_dap may be unused) + breakpoints = self.breakpoints + if breakpoints and hasattr(breakpoints[0], "to_dict"): + breakpoints = [x.to_dict() for x in breakpoints] + dct = { + 'breakpoints': [Breakpoint.update_dict_ids_to_dap(o) for o in breakpoints] if (update_ids_to_dap and breakpoints) else breakpoints, + } + dct.update(self.kwargs) + return dct + + @register class ContinueResponseBody(BaseSchema): """ @@ -16309,7 +17714,7 @@ class ContinueResponseBody(BaseSchema): __props__ = { "allThreadsContinued": { "type": "boolean", - "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead. If this attribute is missing a value of 'true' is assumed for backward compatibility." + "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." } } __refs__ = set() @@ -16318,7 +17723,8 @@ class ContinueResponseBody(BaseSchema): def __init__(self, allThreadsContinued=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param boolean allThreadsContinued: If true, the 'continue' request has ignored the specified thread and continued all threads instead. If this attribute is missing a value of 'true' is assumed for backward compatibility. + :param boolean allThreadsContinued: If true, the 'continue' request has ignored the specified thread and continued all threads instead. + If this attribute is missing a value of 'true' is assumed for backward compatibility. """ self.allThreadsContinued = allThreadsContinued self.kwargs = kwargs @@ -16352,7 +17758,7 @@ class StackTraceResponseBody(BaseSchema): }, "totalFrames": { "type": "integer", - "description": "The total number of frames available." + "description": "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." } } __refs__ = set() @@ -16363,7 +17769,7 @@ def __init__(self, stackFrames, totalFrames=None, update_ids_from_dap=False, **k """ :param array stackFrames: The frames of the stackframe. If the array has length zero, there are no stackframes available. This means that there is no location information available. - :param integer totalFrames: The total number of frames available. + :param integer totalFrames: 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. """ self.stackFrames = stackFrames if update_ids_from_dap and self.stackFrames: @@ -16492,15 +17898,15 @@ class SetVariableResponseBody(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } } __refs__ = set() @@ -16511,11 +17917,14 @@ def __init__(self, value, type=None, variablesReference=None, namedVariables=Non """ :param string value: The new value of the variable. :param string type: The type of the new value. Typically shown in the UI when hovering over the value. - :param integer variablesReference: If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1). + :param integer variablesReference: If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. + The value should be less than or equal to 2147483647 (2^31-1). :param integer namedVariables: The number of named child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). :param integer indexedVariables: The number of indexed child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). """ self.value = value self.type = type @@ -16760,7 +18169,7 @@ class EvaluateResponseBody(BaseSchema): }, "type": { "type": "string", - "description": "The optional type of the evaluate result." + "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "description": "Properties of a evaluate result that can be used to determine how to render the result in the UI.", @@ -16768,19 +18177,19 @@ class EvaluateResponseBody(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "memoryReference": { "type": "string", - "description": "Memory reference to a location appropriate for this result. For pointer type eval results, this is generally a reference to the memory address contained in the pointer." + "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." } } __refs__ = set(['presentationHint']) @@ -16790,14 +18199,20 @@ class EvaluateResponseBody(BaseSchema): def __init__(self, result, variablesReference, type=None, presentationHint=None, namedVariables=None, indexedVariables=None, memoryReference=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ :param string result: The result of the evaluate request. - :param integer variablesReference: If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1). + :param integer variablesReference: If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. + The value should be less than or equal to 2147483647 (2^31-1). :param string type: The optional type of the evaluate result. + This attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request. :param VariablePresentationHint presentationHint: Properties of a evaluate result that can be used to determine how to render the result in the UI. :param integer namedVariables: The number of named child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). :param integer indexedVariables: The number of indexed child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). - :param string memoryReference: Memory reference to a location appropriate for this result. For pointer type eval results, this is generally a reference to the memory address contained in the pointer. + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). + :param string memoryReference: Optional memory reference to a location appropriate for this result. + For pointer type eval results, this is generally a reference to the memory address contained in the pointer. + This attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request. """ self.result = result self.variablesReference = variablesReference @@ -16870,7 +18285,7 @@ class SetExpressionResponseBody(BaseSchema): }, "type": { "type": "string", - "description": "The optional type of the value." + "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." }, "presentationHint": { "description": "Properties of a value that can be used to determine how to render the result in the UI.", @@ -16878,15 +18293,15 @@ class SetExpressionResponseBody(BaseSchema): }, "variablesReference": { "type": "integer", - "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "namedVariables": { "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." }, "indexedVariables": { "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1)." + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." } } __refs__ = set(['presentationHint']) @@ -16897,12 +18312,16 @@ def __init__(self, value, type=None, presentationHint=None, variablesReference=N """ :param string value: The new value of the expression. :param string type: The optional type of the value. + This attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request. :param VariablePresentationHint presentationHint: Properties of a value that can be used to determine how to render the result in the UI. - :param integer variablesReference: If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. The value should be less than or equal to 2147483647 (2^31 - 1). + :param integer variablesReference: If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest. + The value should be less than or equal to 2147483647 (2^31-1). :param integer namedVariables: The number of named child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). :param integer indexedVariables: The number of indexed child variables. - The client can use this optional information to present the variables in a paged UI and fetch them in chunks. The value should be less than or equal to 2147483647 (2^31 - 1). + The client can use this optional information to present the variables in a paged UI and fetch them in chunks. + The value should be less than or equal to 2147483647 (2^31-1). """ self.value = value self.type = type @@ -17124,7 +18543,8 @@ def __init__(self, exceptionId, breakMode, description=None, details=None, updat :param ExceptionDetails details: Detailed information about the exception. """ self.exceptionId = exceptionId - assert breakMode in ExceptionBreakMode.VALID_VALUES + if breakMode is not None: + assert breakMode in ExceptionBreakMode.VALID_VALUES self.breakMode = breakMode self.description = description if details is None: @@ -17162,11 +18582,11 @@ class ReadMemoryResponseBody(BaseSchema): __props__ = { "address": { "type": "string", - "description": "The address of the first byte of data returned. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." }, "unreadableBytes": { "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." }, "data": { "type": "string", @@ -17179,8 +18599,10 @@ class ReadMemoryResponseBody(BaseSchema): def __init__(self, address, unreadableBytes=None, data=None, update_ids_from_dap=False, **kwargs): # noqa (update_ids_from_dap may be unused) """ - :param string address: The address of the first byte of data returned. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise. - :param integer unreadableBytes: The number of unreadable bytes encountered after the last successfully read byte. This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed. + :param string address: The address of the first byte of data returned. + Treated as a hex value if prefixed with '0x', or as a decimal value otherwise. + :param integer unreadableBytes: The number of unreadable bytes encountered after the last successfully read byte. + This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed. :param string data: The bytes read from memory, encoded using base64. """ self.address = address diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py index 511a5dd23..03fe6a3c3 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py @@ -1010,7 +1010,17 @@ def __create_frame(): return variable = frame_tracker.obtain_as_variable(expression, eval_result, frame=frame) - var_data = variable.get_var_data(fmt=fmt) + + safe_repr_custom_attrs = {} + if context == 'clipboard': + safe_repr_custom_attrs = dict( + maxstring_outer=2 ** 64, + maxstring_inner=2 ** 64, + maxother_outer=2 ** 64, + maxother_inner=2 ** 64, + ) + + var_data = variable.get_var_data(fmt=fmt, **safe_repr_custom_attrs) body = pydevd_schema.EvaluateResponseBody( result=var_data['value'], diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py index 451dc6720..eefa77f16 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py @@ -217,6 +217,7 @@ def on_initialize_request(self, py_db, request): supportsLogPoints=True, supportsSetExpression=True, supportsTerminateRequest=True, + supportsClipboardContext=True, exceptionBreakpointFilters=[ {'filter': 'raised', 'label': 'Raised Exceptions', 'default': False}, diff --git a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py index d94fdc834..37d543966 100644 --- a/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py +++ b/src/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_suspended_frames.py @@ -35,7 +35,7 @@ def get_value(self): def get_variable_reference(self): return id(self.value) - def get_var_data(self, fmt=None): + def get_var_data(self, fmt=None, **safe_repr_custom_attrs): ''' :param dict fmt: Format expected by the DAP (keys: 'hex': bool, 'rawString': bool) @@ -44,6 +44,8 @@ def get_var_data(self, fmt=None): if fmt is not None: safe_repr.convert_to_hex = fmt.get('hex', False) safe_repr.raw_value = fmt.get('rawString', False) + for key, val in safe_repr_custom_attrs.items(): + setattr(safe_repr, key, val) type_name, _type_qualifier, _is_exception_on_eval, resolver, value = get_variable_details( self.value, to_string=safe_repr) diff --git a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py index 3b112f51b..26894de85 100644 --- a/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py +++ b/src/debugpy/_vendored/pydevd/tests_python/test_debugger_json.py @@ -237,7 +237,7 @@ def write_set_exception_breakpoints(self, filters=None, exception_options=None): exception_options = exception_options or [] exception_options = [exception_option.to_dict() for exception_option in exception_options] - arguments = pydevd_schema.SetExceptionBreakpointsArguments(filters, exception_options) + arguments = pydevd_schema.SetExceptionBreakpointsArguments(filters=filters, exceptionOptions=exception_options) request = pydevd_schema.SetExceptionBreakpointsRequest(arguments) # : :type response: SetExceptionBreakpointsResponse response = self.wait_for_response(self.write_request(request)) @@ -1690,6 +1690,66 @@ def test_evaluate_block_repl(case_setup): writer.finished_ok = True +def test_evaluate_block_clipboard(case_setup, pyfile): + + @pyfile + def target(): + MAX_LIMIT = 65538 + + class SomeObj(object): + + def __str__(self): + return var1 + + __repr__ = __str__ + + var1 = 'a' * 80000 + var2 = 20000 + var3 = SomeObj() + + print('TEST SUCEEDED') # Break here + + def verify(evaluate_response): + # : :type evaluate_response: EvaluateResponse + assert len(evaluate_response.body.result) >= 80000 + assert '...' not in evaluate_response.body.result + assert set(evaluate_response.body.result).issubset(set(['a', "'"])) + + with case_setup.test_file(target) as writer: + json_facade = JsonFacade(writer) + json_facade.write_launch(justMyCode=False) + json_facade.write_set_breakpoints(writer.get_line_index_with_content('Break here')) + json_facade.write_make_initial_run() + + json_hit = json_facade.wait_for_thread_stopped() + json_hit = json_facade.get_stack_as_json_hit(json_hit.thread_id) + + evaluate_response = json_facade.evaluate( + 'var1', + frameId=json_hit.frame_id, + context='clipboard', + ) + verify(evaluate_response) + + evaluate_response = json_facade.evaluate( + 'var2', + frameId=json_hit.frame_id, + context='clipboard', + fmt={'hex': True} + ) + assert evaluate_response.body.result == "0x4e20" + + evaluate_response = json_facade.evaluate( + 'var3', + frameId=json_hit.frame_id, + context='clipboard', + ) + verify(evaluate_response) + + json_facade.write_continue() + writer.finished_ok = True + + @pytest.mark.skipif(IS_PY26, reason='__dir__ not customizable on Python 2.6') def test_exception_on_dir(case_setup): with case_setup.test_file('_debugger_case_dir_exception.py') as writer: diff --git a/src/debugpy/adapter/clients.py b/src/debugpy/adapter/clients.py index e431e402e..22b769bc5 100644 --- a/src/debugpy/adapter/clients.py +++ b/src/debugpy/adapter/clients.py @@ -172,6 +172,7 @@ def initialize_request(self, request): "supportsValueFormattingOptions": True, "supportsTerminateDebuggee": True, "supportsGotoTargetsRequest": True, + "supportsClipboardContext": True, "exceptionBreakpointFilters": exception_breakpoint_filters, }