class ARGUMENTS(FieldsNamespace): FIELDS = [ Field('source', shared.Source), Field('line', int), Field.START_OPTIONAL, Field('column', int), ]
class Module(FieldsNamespace): """A Module object represents a row in the modules view. Two attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting. The name is used to minimally render the module in the UI. Additional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor. To avoid an unnecessary proliferation of additional attributes with similar semantics but different names we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found. """ FIELDS = [ Field('id', {int, str}), Field('name'), Field.START_OPTIONAL, Field('path'), Field('isOptimized', bool), Field('isUserCode', bool), Field('version'), Field('symbolStatus'), Field('symbolFilePath'), Field('dateTimeStamp'), Field('addressRange'), ]
class Thread(FieldsNamespace): """A thread.""" FIELDS = [ Field('id', int), Field('name'), ]
class ARGUMENTS(FieldsNamespace): FIELDS = [ Field('threadId', int), Field.START_OPTIONAL, Field('startFrame', int), Field('levels', int), Field('format', datatypes.StackFrameFormat), ]
class ARGUMENTS(FieldsNamespace): FIELDS = [ Field('source', shared.Source), Field.START_OPTIONAL, Field('breakpoints', [datatypes.SourceBreakpoint]), Field('lines', [int]), Field('sourceModified', bool), ]
class BODY(FieldsNamespace): FIELDS = [ Field('exceptionId'), Field('description', optional=True), Field('breakMode', datatypes.ExceptionBreakMode), Field.START_OPTIONAL, Field('details', datatypes.ExceptionDetails), ]
class ARGUMENTS(FieldsNamespace): FIELDS = [ Field('frameId', int, optional=True), Field('text'), Field('column', int), Field.START_OPTIONAL, Field('line', int), ]
class ARGUMENTS(FieldsNamespace): FIELDS = [ Field('variablesReference', int), Field('name'), Field('value'), Field.START_OPTIONAL, Field('format', datatypes.ValueFormat), ]
class Checksum(FieldsNamespace): """The checksum of an item calculated by the specified algorithm.""" ALGORITHMS = {'MD5', 'SHA1', 'SHA256', 'timestamp'} FIELDS = [ Field('algorithm', enum=ALGORITHMS), Field('checksum'), ]
class BODY(FieldsNamespace): START_METHODS = {'launch', 'attach', 'attachForSuspendedLaunch'} FIELDS = [ Field('name'), Field.START_OPTIONAL, Field('systemProcessId', int), Field('isLocalProcess', bool), Field('startMethod', enum=START_METHODS), ]
class BODY(FieldsNamespace): FIELDS = [ Field('value'), Field.START_OPTIONAL, Field('type'), Field('variablesReference', int), # number Field('namedVariables', int), # number Field('indexedVariables', int), # number ]
class ExceptionOptions(FieldsNamespace): """ An ExceptionOptions assigns configuration options to a set of exceptions. """ FIELDS = [ Field('path', [ExceptionPathSegment], optional=True), Field('breakMode', ExceptionBreakMode), ]
class ARGUMENTS(FieldsNamespace): CONTEXTS = {'watch', 'repl', 'hover'} FIELDS = [ Field('expression'), Field.START_OPTIONAL, Field('frameId', int), Field('context', enum=CONTEXTS), Field('format', datatypes.ValueFormat), ]
class SourceBreakpoint(FieldsNamespace): """Properties of a breakpoint passed to the setBreakpoints request.""" FIELDS = [ Field('line', int), Field.START_OPTIONAL, Field('column', int), Field('condition'), Field('hitCondition'), ]
class StepInTarget(FieldsNamespace): """ A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step. """ FIELDS = [ Field('id', int), Field('label'), ]
class ARGUMENTS(FieldsNamespace): KINDS = {'integrated', 'external'} FIELDS = [ Field('kind', enum=KINDS, optional=True), Field('title', optional=True), Field('cwd'), Field('args', [str]), Field.START_OPTIONAL, Field('env', {str: {str, None}}), ]
class BODY(FieldsNamespace): REASONS = {'step', 'breakpoint', 'exception', 'pause', 'entry'} FIELDS = [ Field('reason', enum=REASONS), Field.START_OPTIONAL, Field('description'), Field('threadId', int), Field('text'), Field('allThreadsStopped', bool), ]
class ARGUMENTS(FieldsNamespace): FILTERS = {'indexed', 'named'} FIELDS = [ Field('variablesReference', int), Field.START_OPTIONAL, Field('filter', enum=FILTERS), Field('start', int), Field('count', int), Field('format', datatypes.ValueFormat), ]
class FunctionBreakpoint(FieldsNamespace): """ Properties of a breakpoint passed to the setFunctionBreakpoints request. """ FIELDS = [ Field('name'), Field.START_OPTIONAL, Field('condition'), Field('hitCondition'), ]
class ExceptionBreakpointsFilter(FieldsNamespace): """ An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are dealt with. """ FIELDS = [ Field('filter'), Field('label'), Field.START_OPTIONAL, Field('default', bool), ]
class ExceptionPathSegment(FieldsNamespace): """ 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. """ FIELDS = [ Field('negate', bool, optional=True), Field('names', [str]), ]
class Variable(FieldsNamespace): """A Variable is a name/value pair. Optionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name. An optional 'kind' is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. If the value is structured (has children), a handle is provided to retrieve the children with the VariablesRequest. If the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes. The client can use this optional information to present the children in a paged UI and fetch them in chunks. """ FIELDS = [ Field('name'), Field('value'), Field.START_OPTIONAL, Field('type'), Field('presentationHint', VariablePresentationHint), Field('evaluateName'), Field('variablesReference', int, optional=False), Field('namedVariables', int), Field('indexedVariables', int), ]
class ValueFormat(FieldsNamespace): """Provides formatting information for a value.""" FIELDS = [ Field.START_OPTIONAL, Field('hex', bool), ]
class ColumnDescriptor(FieldsNamespace): """ 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. It is only used if the underlying UI actually supports this level of customization. """ TYPES = {"string", "number", "boolean", "unixTimestampUTC"} FIELDS = [ Field('attributeName'), Field('label'), Field.START_OPTIONAL, Field('format'), Field('type'), Field('width', int), ]
class CompletionItem(FieldsNamespace): """ CompletionItems are the suggestions returned from the CompletionsRequest. """ TYPES = {"method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor"} FIELDS = [ Field('label'), Field.START_OPTIONAL, Field('text'), Field('type'), Field('start', int), Field('length', int), ]
class VariablePresentationHint(FieldsNamespace): """ Optional properties of a variable that can be used to determine how to render the variable in the UI. """ KINDS = {"property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual"} ATTRIBUTES = {"static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects"} VISIBILITIES = {"public", "private", "protected", "internal", "final"} FIELDS = [ Field.START_OPTIONAL, Field('kind', enum=KINDS), Field('attributes', [Enum(str, ATTRIBUTES)]), Field('visibility', enum=VISIBILITIES), ]
class ARGUMENTS(FieldsNamespace): PATH_FORMATS = {'path', 'uri'} FIELDS = [ Field('clientID', optional=True), Field('adapterID'), Field.START_OPTIONAL, Field('locale'), Field('linesStartAt1', bool), Field('columnsStartAt1', bool), Field('pathFormat', enum=PATH_FORMATS), Field('supportsVariableType', bool), Field('supportsVariablePaging', bool), Field('supportsRunInTerminalRequest', bool), ]
class ModulesViewDescriptor(FieldsNamespace): """ The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView. For now it only specifies the columns to be shown in the modules view. """ FIELDS = [ Field('columns', [ColumnDescriptor]), ]
class Scope(FieldsNamespace): """ A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source. """ FIELDS = [ Field('name'), Field('variablesReference', int), Field('namedVariables', int, optional=True), Field('indexedVariables', int, optional=True), Field('expensive', bool), Field.START_OPTIONAL, Field('source', Source), Field('line', int), Field('column', int), Field('endLine', int), Field('endColumn', int), ]
class StackFrame(FieldsNamespace): """A Stackframe contains the source location.""" PRESENTATION_HINTS = {"normal", "label", "subtle"} FIELDS = [ Field('id', int), Field('name'), Field('source', Source, optional=True), Field('line', int), Field('column', int), Field.START_OPTIONAL, Field('endLine', int), Field('endColumn', int), Field("moduleId", {int, str}), Field('presentationHint'), ]