ruby-dap 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +17 -3
- data/lib/dap.rb +4 -0
- data/lib/dap/attach_request_arguments.rb +2 -0
- data/lib/dap/base.rb +57 -6
- data/lib/dap/breakpoint.rb +11 -9
- data/lib/dap/breakpoint_event_body.rb +2 -1
- data/lib/dap/breakpoint_location.rb +6 -4
- data/lib/dap/breakpoint_locations_arguments.rb +5 -4
- data/lib/dap/breakpoint_locations_response_body.rb +2 -0
- data/lib/dap/cancel_arguments.rb +3 -2
- data/lib/dap/capabilities.rb +33 -32
- data/lib/dap/capabilities_event_body.rb +6 -0
- data/lib/dap/checksum.rb +2 -1
- data/lib/dap/checksum_algorithm.rb +1 -0
- data/lib/dap/column_descriptor.rb +8 -5
- data/lib/dap/completion_item.rb +8 -7
- data/lib/dap/completion_item_type.rb +2 -0
- data/lib/dap/completions_arguments.rb +5 -4
- data/lib/dap/completions_response_body.rb +1 -0
- data/lib/dap/continue_arguments.rb +2 -1
- data/lib/dap/continue_response_body.rb +2 -1
- data/lib/dap/continued_event_body.rb +7 -2
- data/lib/dap/data_breakpoint.rb +4 -3
- data/lib/dap/data_breakpoint_access_type.rb +1 -0
- data/lib/dap/data_breakpoint_info_arguments.rb +3 -2
- data/lib/dap/data_breakpoint_info_response_body.rb +3 -2
- data/lib/dap/disassemble_arguments.rb +6 -5
- data/lib/dap/disassemble_response_body.rb +1 -0
- data/lib/dap/disassembled_instruction.rb +9 -8
- data/lib/dap/disconnect_arguments.rb +3 -2
- data/lib/dap/encoding.rb +12 -1
- data/lib/dap/enum.rb +6 -0
- data/lib/dap/error_response_body.rb +1 -0
- data/lib/dap/evaluate_arguments.rb +4 -3
- data/lib/dap/evaluate_response_body.rb +7 -6
- data/lib/dap/event.rb +7 -0
- data/lib/dap/exception_break_mode.rb +6 -0
- data/lib/dap/exception_breakpoints_filter.rb +5 -3
- data/lib/dap/exception_details.rb +6 -5
- data/lib/dap/exception_info_arguments.rb +2 -1
- data/lib/dap/exception_info_response_body.rb +3 -2
- data/lib/dap/exception_options.rb +1 -0
- data/lib/dap/exception_path_segment.rb +6 -2
- data/lib/dap/exited_event_body.rb +2 -1
- data/lib/dap/function_breakpoint.rb +4 -3
- data/lib/dap/goto_arguments.rb +3 -2
- data/lib/dap/goto_target.rb +10 -7
- data/lib/dap/goto_targets_arguments.rb +3 -2
- data/lib/dap/goto_targets_response_body.rb +1 -0
- data/lib/dap/initialize_request_arguments.rb +14 -13
- data/lib/dap/instruction_breakpoint.rb +5 -4
- data/lib/dap/invalidated_event_body.rb +11 -3
- data/lib/dap/launch_request_arguments.rb +3 -1
- data/lib/dap/loaded_source_event_body.rb +3 -1
- data/lib/dap/loaded_sources_response_body.rb +1 -0
- data/lib/dap/message.rb +8 -7
- data/lib/dap/module.rb +17 -8
- data/lib/dap/module_event_body.rb +2 -1
- data/lib/dap/modules_arguments.rb +3 -2
- data/lib/dap/modules_response_body.rb +2 -1
- data/lib/dap/next_arguments.rb +2 -1
- data/lib/dap/output_event_body.rb +7 -6
- data/lib/dap/pause_arguments.rb +2 -1
- data/lib/dap/process_event_body.rb +7 -5
- data/lib/dap/progress_end_event_body.rb +5 -2
- data/lib/dap/progress_start_event_body.rb +12 -6
- data/lib/dap/progress_update_event_body.rb +9 -3
- data/lib/dap/protocol_message.rb +12 -1
- data/lib/dap/read_memory_arguments.rb +4 -3
- data/lib/dap/read_memory_response_body.rb +4 -3
- data/lib/dap/relation.rb +17 -1
- data/lib/dap/request.rb +7 -0
- data/lib/dap/response.rb +22 -1
- data/lib/dap/restart_frame_arguments.rb +2 -1
- data/lib/dap/reverse_continue_arguments.rb +2 -1
- data/lib/dap/run_in_terminal_request_arguments.rb +6 -5
- data/lib/dap/run_in_terminal_response_body.rb +3 -2
- data/lib/dap/scope.rb +12 -10
- data/lib/dap/scopes_arguments.rb +2 -1
- data/lib/dap/scopes_response_body.rb +1 -0
- data/lib/dap/set_breakpoints_arguments.rb +3 -2
- data/lib/dap/set_breakpoints_response_body.rb +5 -0
- data/lib/dap/set_data_breakpoints_arguments.rb +1 -0
- data/lib/dap/set_data_breakpoints_response_body.rb +2 -0
- data/lib/dap/set_exception_breakpoints_arguments.rb +2 -1
- data/lib/dap/set_expression_arguments.rb +4 -3
- data/lib/dap/set_expression_response_body.rb +6 -5
- data/lib/dap/set_function_breakpoints_arguments.rb +1 -0
- data/lib/dap/set_function_breakpoints_response_body.rb +2 -0
- data/lib/dap/set_instruction_breakpoints_arguments.rb +1 -0
- data/lib/dap/set_instruction_breakpoints_response_body.rb +1 -0
- data/lib/dap/set_variable_arguments.rb +4 -3
- data/lib/dap/set_variable_response_body.rb +6 -5
- data/lib/dap/source.rb +7 -5
- data/lib/dap/source_arguments.rb +2 -1
- data/lib/dap/source_breakpoint.rb +6 -5
- data/lib/dap/source_response_body.rb +3 -2
- data/lib/dap/stack_frame.rb +9 -8
- data/lib/dap/stack_frame_format.rb +8 -7
- data/lib/dap/stack_trace_arguments.rb +4 -3
- data/lib/dap/stack_trace_response_body.rb +2 -1
- data/lib/dap/step_back_arguments.rb +2 -1
- data/lib/dap/step_in_arguments.rb +3 -2
- data/lib/dap/step_in_target.rb +4 -2
- data/lib/dap/step_in_targets_arguments.rb +2 -1
- data/lib/dap/step_in_targets_response_body.rb +1 -0
- data/lib/dap/step_out_arguments.rb +2 -1
- data/lib/dap/stepping_granularity.rb +10 -0
- data/lib/dap/stopped_event_body.rb +9 -6
- data/lib/dap/terminate_arguments.rb +2 -1
- data/lib/dap/terminate_threads_arguments.rb +2 -1
- data/lib/dap/terminated_event_body.rb +2 -0
- data/lib/dap/thread.rb +3 -2
- data/lib/dap/thread_event_body.rb +3 -2
- data/lib/dap/threads_response_body.rb +1 -0
- data/lib/dap/value_format.rb +2 -1
- data/lib/dap/variable.rb +17 -8
- data/lib/dap/variable_presentation_hint.rb +5 -3
- data/lib/dap/variables_arguments.rb +5 -4
- data/lib/dap/variables_response_body.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d5f279747fa6dcf2cd60bfba40b6d76d4910877bd00b69de4b9f054591955c6
|
4
|
+
data.tar.gz: 3055a809c817620f7fb8eba44736377e2193ba59bc2196823fd55fabf0902cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e42f548ee238fc36a1142f9e406e758fd67ded7c7f62f1b7520b2adc7a0d58522332cf49d3e658539d57c33b5230f82ec1dbbc037fccfdcd5ee385cf2821a1db
|
7
|
+
data.tar.gz: 2dcb74846b33be54a8161018233732c4b53fe677bec6cb7b5afd1d1de7bc1e23a52feb1cfbd5ec8edb3d7864ece410a1e2eec74409b3bb8d104f67197720b32d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/ruby-dap.svg)](https://badge.fury.io/rb/ruby-dap) [![Documentation](https://img.shields.io/static/v1?label=docs&message=master&color=informational&style=flat)](https://firelizzard.gitlab.io/ruby-dap/)
|
2
|
+
|
1
3
|
# Ruby Debug Adapter Protocol
|
2
4
|
|
3
5
|
This gem provides models, parsers, and formatters for the [Debug Adapter
|
@@ -11,6 +13,18 @@ specification](https://microsoft.github.io/debug-adapter-protocol/specification)
|
|
11
13
|
to Ruby classes. To regenerate the Ruby classes, set `PRETEND = false` in the
|
12
14
|
file and run `echo <spec> | ruby convert.rb -` or `ruby convert.rb <spec-file>`.
|
13
15
|
If the input contains multiple files, `convert.rb` expects them to be separated
|
14
|
-
with `\n\n// ---\n\n`. All of the specs can be extracted at once by running
|
15
|
-
|
16
|
-
|
16
|
+
with `\n\n// ---\n\n`. All of the specs can be extracted at once by running the
|
17
|
+
following in the browser JavaScript console:
|
18
|
+
|
19
|
+
|
20
|
+
```javascript
|
21
|
+
$('.language-typescript').toArray().map(x => {
|
22
|
+
let t = x.innerText;
|
23
|
+
x = $(x);
|
24
|
+
let s = [];
|
25
|
+
for (x = x.prev('p, ul'); x.length; x = x.prev('p, ul'))
|
26
|
+
s.unshift(...x.text().split('\n').filter(x => x.indexOf('Values: ') != 0));
|
27
|
+
if (!s.length) return t;
|
28
|
+
return s.map(x => '// ' + x).join('\n') + '\n' + t;
|
29
|
+
}).join('\n\n// ---\n\n')
|
30
|
+
```
|
data/lib/dap.rb
CHANGED
@@ -1,14 +1,18 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
|
+
# The Debug Adapter Protocol
|
3
4
|
module DAP
|
5
|
+
# (see DAP::Encoding.decode)
|
4
6
|
def self.decode(s)
|
5
7
|
DAP::Encoding.decode(s)
|
6
8
|
end
|
7
9
|
|
10
|
+
# (see DAP::Encoding.encode)
|
8
11
|
def self.encode(message)
|
9
12
|
DAP::Encoding.encode(message)
|
10
13
|
end
|
11
14
|
|
15
|
+
# (see DAP::Encoding.decode_all)
|
12
16
|
def self.decode_all(s, &block)
|
13
17
|
DAP::Encoding.decode_all(s, &block)
|
14
18
|
end
|
data/lib/dap/base.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
+
# Base class for DAP types
|
1
2
|
class DAP::Base
|
3
|
+
# Build an instance of a DAP type.
|
4
|
+
# @param values [Hash|String] attribute values or enum string
|
5
|
+
# @yieldparam values [Hash] normalized attribute values (optional)
|
6
|
+
# @yieldreturn [Class] the class to instantiate
|
2
7
|
def self.build(values, &block)
|
3
8
|
values.transform_keys! &:to_sym if values.is_a? Hash
|
4
9
|
|
@@ -15,18 +20,32 @@ class DAP::Base
|
|
15
20
|
klazz.new(values)
|
16
21
|
end
|
17
22
|
|
23
|
+
# Returns a relation that indicates a property should be an array of the
|
24
|
+
# specified type.
|
25
|
+
# @param klazz [Class] the expected type of members of the property
|
26
|
+
# @return [Relation::Many]
|
18
27
|
def self.many(klazz)
|
19
28
|
DAP::Relation::Many.new(klazz)
|
20
29
|
end
|
21
30
|
|
31
|
+
# Returns a relation that indicates a property should be one of a set of
|
32
|
+
# types.
|
33
|
+
# @param choices [Hash[String, Class]] the allowed property types
|
34
|
+
# @return [Relation::OneOf]
|
22
35
|
def self.one_of(choices)
|
23
36
|
DAP::Relation::OneOf.new(choices)
|
24
37
|
end
|
25
38
|
|
39
|
+
# Returns a relation that indicates a property is expected to be an empty
|
40
|
+
# object.
|
26
41
|
def self.empty
|
27
42
|
Class.new(DAP::Base)
|
28
43
|
end
|
29
44
|
|
45
|
+
# Defines a property or properties.
|
46
|
+
# @param names [Array<Symbol>] the properties
|
47
|
+
# @param as [Class|Relation|String] the expected type of the property
|
48
|
+
# @param required [Boolean] whether the property is required
|
30
49
|
def self.property(*names, as: nil, required: true)
|
31
50
|
@properties ||= []
|
32
51
|
@transformations ||= {}
|
@@ -34,15 +53,19 @@ class DAP::Base
|
|
34
53
|
klazz = name
|
35
54
|
|
36
55
|
names.each do |name|
|
37
|
-
|
56
|
+
case as
|
57
|
+
when nil, String
|
58
|
+
# ignore
|
59
|
+
|
60
|
+
when Class
|
38
61
|
DAP::Relation.supported!(as)
|
39
62
|
|
40
63
|
transform = ->(value, values, invert: false) { value.nil? ? nil : invert ? value.to_wire : build(value || {}) { as } }
|
41
64
|
|
42
|
-
|
65
|
+
when DAP::Relation::Many
|
43
66
|
transform = ->(value, values, invert: false) { value.nil? ? nil : invert ? value.map(&:to_wire) : value.map { |v| build(v) { as.klazz } } }
|
44
67
|
|
45
|
-
|
68
|
+
when DAP::Relation::OneOf
|
46
69
|
transform = ->(value, values, invert: false) do
|
47
70
|
return value.to_wire if invert
|
48
71
|
|
@@ -55,7 +78,7 @@ class DAP::Base
|
|
55
78
|
end
|
56
79
|
end
|
57
80
|
|
58
|
-
|
81
|
+
else
|
59
82
|
raise "Invalid property constraint: #{as.class} #{as.inspect}"
|
60
83
|
end
|
61
84
|
|
@@ -70,6 +93,7 @@ class DAP::Base
|
|
70
93
|
attr_reader(*names)
|
71
94
|
end
|
72
95
|
|
96
|
+
# Properties of the receiver.
|
73
97
|
def self.properties
|
74
98
|
@properties ||= []
|
75
99
|
return @properties if self == DAP::Base
|
@@ -77,16 +101,22 @@ class DAP::Base
|
|
77
101
|
superclass.properties + @properties
|
78
102
|
end
|
79
103
|
|
104
|
+
# Names of the receiver's properties.
|
80
105
|
def self.property_names
|
81
106
|
properties.map { |p| p[:name] }
|
82
107
|
end
|
83
108
|
|
109
|
+
# Retreives the transform for the named property.
|
110
|
+
# @param name [String] the property name
|
111
|
+
# @return [Proc] the transform
|
84
112
|
def self.transform(name)
|
85
113
|
(@properties || []).each { |p| return p[:transform] if p[:name] == name && p[:transform] }
|
86
114
|
|
87
115
|
return superclass.transform(name) unless self == DAP::Base
|
88
116
|
end
|
89
117
|
|
118
|
+
# Create a new instance of the receiver.
|
119
|
+
# @param values [Hash] the object's attributes
|
90
120
|
def initialize(values)
|
91
121
|
values.transform_keys!(&:to_sym)
|
92
122
|
|
@@ -100,6 +130,7 @@ class DAP::Base
|
|
100
130
|
end
|
101
131
|
end
|
102
132
|
|
133
|
+
# Validate property values against their expectations.
|
103
134
|
def validate!
|
104
135
|
self.class.properties.each do |p|
|
105
136
|
key, required = p[:name], p[:required]
|
@@ -119,13 +150,18 @@ class DAP::Base
|
|
119
150
|
self
|
120
151
|
end
|
121
152
|
|
153
|
+
# Convert the receiver to a form suitable for encoding.
|
154
|
+
# @return [Hash]
|
122
155
|
def to_wire
|
123
156
|
self.class.property_names.each_with_object({}) do |k, h|
|
124
157
|
v = self[k]
|
125
158
|
next if v.nil?
|
126
159
|
|
127
|
-
transform = self.class.transform(k)
|
128
|
-
|
160
|
+
if transform = self.class.transform(k)
|
161
|
+
v = transform.call(v, self, invert: true) if transform
|
162
|
+
else
|
163
|
+
v = convert_complex(v)
|
164
|
+
end
|
129
165
|
|
130
166
|
h[k] = v
|
131
167
|
end
|
@@ -142,4 +178,19 @@ class DAP::Base
|
|
142
178
|
key = key.to_sym
|
143
179
|
instance_variable_set("@#{key}".to_sym, value)
|
144
180
|
end
|
181
|
+
|
182
|
+
def convert_complex(v)
|
183
|
+
case v
|
184
|
+
when Array
|
185
|
+
v.map { |v| convert_complex(v) }
|
186
|
+
when Hash
|
187
|
+
v.transform_values { |v| convert_complex(v) }
|
188
|
+
when DAP::Base, DAP::Enum
|
189
|
+
v.to_wire
|
190
|
+
when String
|
191
|
+
v.encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')
|
192
|
+
else
|
193
|
+
v
|
194
|
+
end
|
195
|
+
end
|
145
196
|
end
|
data/lib/dap/breakpoint.rb
CHANGED
@@ -1,36 +1,38 @@
|
|
1
1
|
require_relative 'source'
|
2
2
|
|
3
|
+
# Information about a Breakpoint created in setBreakpoints,
|
4
|
+
# setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.
|
3
5
|
class DAP::Breakpoint < DAP::Base
|
4
6
|
# An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints.
|
5
|
-
property :id, required: false
|
7
|
+
property :id, required: false, as: 'number'
|
6
8
|
|
7
9
|
# If true breakpoint could be set (but not necessarily at the desired location).
|
8
|
-
property :verified
|
10
|
+
property :verified, as: 'boolean'
|
9
11
|
|
10
12
|
# An optional message about the state of the breakpoint.
|
11
13
|
# This is shown to the user and can be used to explain why a breakpoint could not be verified.
|
12
|
-
property :message, required: false
|
14
|
+
property :message, required: false, as: 'string'
|
13
15
|
|
14
16
|
# The source where the breakpoint is located.
|
15
17
|
property :source, required: false, as: DAP::Source
|
16
18
|
|
17
19
|
# The start line of the actual range covered by the breakpoint.
|
18
|
-
property :line, required: false
|
20
|
+
property :line, required: false, as: 'number'
|
19
21
|
|
20
22
|
# An optional start column of the actual range covered by the breakpoint.
|
21
|
-
property :column, required: false
|
23
|
+
property :column, required: false, as: 'number'
|
22
24
|
|
23
25
|
# An optional end line of the actual range covered by the breakpoint.
|
24
|
-
property :endLine, required: false
|
26
|
+
property :endLine, required: false, as: 'number'
|
25
27
|
|
26
28
|
# An optional end column of the actual range covered by the breakpoint.
|
27
29
|
# If no end line is given, then the end column is assumed to be in the start line.
|
28
|
-
property :endColumn, required: false
|
30
|
+
property :endColumn, required: false, as: 'number'
|
29
31
|
|
30
32
|
# An optional memory reference to where the breakpoint is set.
|
31
|
-
property :instructionReference, required: false
|
33
|
+
property :instructionReference, required: false, as: 'string'
|
32
34
|
|
33
35
|
# An optional offset from the instruction reference.
|
34
36
|
# This can be negative.
|
35
|
-
property :offset, required: false
|
37
|
+
property :offset, required: false, as: 'number'
|
36
38
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
require_relative 'breakpoint'
|
2
2
|
|
3
|
+
# The event indicates that some information about a breakpoint has changed.
|
3
4
|
class DAP::BreakpointEventBody < DAP::Base
|
4
5
|
# The reason for the event.
|
5
6
|
# Values: 'changed', 'new', 'removed', etc.
|
6
|
-
property :reason
|
7
|
+
property :reason, as: 'string'
|
7
8
|
|
8
9
|
# The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values.
|
9
10
|
property :breakpoint, as: DAP::Breakpoint
|
@@ -1,13 +1,15 @@
|
|
1
|
+
# Properties of a breakpoint location returned from the ‘breakpointLocations’
|
2
|
+
# request.
|
1
3
|
class DAP::BreakpointLocation < DAP::Base
|
2
4
|
# Start line of breakpoint location.
|
3
|
-
property :line
|
5
|
+
property :line, as: 'number'
|
4
6
|
|
5
7
|
# Optional start column of breakpoint location.
|
6
|
-
property :column, required: false
|
8
|
+
property :column, required: false, as: 'number'
|
7
9
|
|
8
10
|
# Optional end line of breakpoint location if the location covers a range.
|
9
|
-
property :endLine, required: false
|
11
|
+
property :endLine, required: false, as: 'number'
|
10
12
|
|
11
13
|
# Optional end column of breakpoint location if the location covers a range.
|
12
|
-
property :endColumn, required: false
|
14
|
+
property :endColumn, required: false, as: 'number'
|
13
15
|
end
|
@@ -1,18 +1,19 @@
|
|
1
1
|
require_relative 'source'
|
2
2
|
|
3
|
+
# Arguments for ‘breakpointLocations’ request.
|
3
4
|
class DAP::BreakpointLocationsArguments < DAP::Base
|
4
5
|
# The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified.
|
5
6
|
property :source, as: DAP::Source
|
6
7
|
|
7
8
|
# Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line.
|
8
|
-
property :line
|
9
|
+
property :line, as: 'number'
|
9
10
|
|
10
11
|
# Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed.
|
11
|
-
property :column, required: false
|
12
|
+
property :column, required: false, as: 'number'
|
12
13
|
|
13
14
|
# Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line.
|
14
|
-
property :endLine, required: false
|
15
|
+
property :endLine, required: false, as: 'number'
|
15
16
|
|
16
17
|
# Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line.
|
17
|
-
property :endColumn, required: false
|
18
|
+
property :endColumn, required: false, as: 'number'
|
18
19
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require_relative 'breakpoint_location'
|
2
2
|
|
3
|
+
# Response to ‘breakpointLocations’ request. Contains possible locations for
|
4
|
+
# source breakpoints.
|
3
5
|
class DAP::BreakpointLocationsResponseBody < DAP::Base
|
4
6
|
# Sorted set of possible breakpoint locations.
|
5
7
|
property :breakpoints, as: many(DAP::BreakpointLocation)
|
data/lib/dap/cancel_arguments.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
+
# Arguments for ‘cancel’ request.
|
1
2
|
class DAP::CancelArguments < DAP::Base
|
2
3
|
# The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.
|
3
4
|
# Both a 'requestId' and a 'progressId' can be specified in one request.
|
4
|
-
property :requestId, required: false
|
5
|
+
property :requestId, required: false, as: 'number'
|
5
6
|
|
6
7
|
# The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.
|
7
8
|
# Both a 'requestId' and a 'progressId' can be specified in one request.
|
8
|
-
property :progressId, required: false
|
9
|
+
property :progressId, required: false, as: 'string'
|
9
10
|
end
|
data/lib/dap/capabilities.rb
CHANGED
@@ -2,48 +2,49 @@ require_relative 'exception_breakpoints_filter'
|
|
2
2
|
require_relative 'column_descriptor'
|
3
3
|
require_relative 'checksum_algorithm'
|
4
4
|
|
5
|
+
# Information about the capabilities of a debug adapter.
|
5
6
|
class DAP::Capabilities < DAP::Base
|
6
7
|
# The debug adapter supports the 'configurationDone' request.
|
7
|
-
property :supportsConfigurationDoneRequest, required: false
|
8
|
+
property :supportsConfigurationDoneRequest, required: false, as: 'boolean'
|
8
9
|
|
9
10
|
# The debug adapter supports function breakpoints.
|
10
|
-
property :supportsFunctionBreakpoints, required: false
|
11
|
+
property :supportsFunctionBreakpoints, required: false, as: 'boolean'
|
11
12
|
|
12
13
|
# The debug adapter supports conditional breakpoints.
|
13
|
-
property :supportsConditionalBreakpoints, required: false
|
14
|
+
property :supportsConditionalBreakpoints, required: false, as: 'boolean'
|
14
15
|
|
15
16
|
# The debug adapter supports breakpoints that break execution after a specified number of hits.
|
16
|
-
property :supportsHitConditionalBreakpoints, required: false
|
17
|
+
property :supportsHitConditionalBreakpoints, required: false, as: 'boolean'
|
17
18
|
|
18
19
|
# The debug adapter supports a (side effect free) evaluate request for data hovers.
|
19
|
-
property :supportsEvaluateForHovers, required: false
|
20
|
+
property :supportsEvaluateForHovers, required: false, as: 'boolean'
|
20
21
|
|
21
22
|
# Available filters or options for the setExceptionBreakpoints request.
|
22
23
|
property :exceptionBreakpointFilters, required: false, as: many(DAP::ExceptionBreakpointsFilter)
|
23
24
|
|
24
25
|
# The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests.
|
25
|
-
property :supportsStepBack, required: false
|
26
|
+
property :supportsStepBack, required: false, as: 'boolean'
|
26
27
|
|
27
28
|
# The debug adapter supports setting a variable to a value.
|
28
|
-
property :supportsSetVariable, required: false
|
29
|
+
property :supportsSetVariable, required: false, as: 'boolean'
|
29
30
|
|
30
31
|
# The debug adapter supports restarting a frame.
|
31
|
-
property :supportsRestartFrame, required: false
|
32
|
+
property :supportsRestartFrame, required: false, as: 'boolean'
|
32
33
|
|
33
34
|
# The debug adapter supports the 'gotoTargets' request.
|
34
|
-
property :supportsGotoTargetsRequest, required: false
|
35
|
+
property :supportsGotoTargetsRequest, required: false, as: 'boolean'
|
35
36
|
|
36
37
|
# The debug adapter supports the 'stepInTargets' request.
|
37
|
-
property :supportsStepInTargetsRequest, required: false
|
38
|
+
property :supportsStepInTargetsRequest, required: false, as: 'boolean'
|
38
39
|
|
39
40
|
# The debug adapter supports the 'completions' request.
|
40
|
-
property :supportsCompletionsRequest, required: false
|
41
|
+
property :supportsCompletionsRequest, required: false, as: 'boolean'
|
41
42
|
|
42
43
|
# The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the '.' character.
|
43
|
-
property :completionTriggerCharacters, required: false
|
44
|
+
property :completionTriggerCharacters, required: false, as: 'string[]'
|
44
45
|
|
45
46
|
# The debug adapter supports the 'modules' request.
|
46
|
-
property :supportsModulesRequest, required: false
|
47
|
+
property :supportsModulesRequest, required: false, as: 'boolean'
|
47
48
|
|
48
49
|
# The set of additional module information exposed by the debug adapter.
|
49
50
|
property :additionalModuleColumns, required: false, as: many(DAP::ColumnDescriptor)
|
@@ -52,59 +53,59 @@ class DAP::Capabilities < DAP::Base
|
|
52
53
|
property :supportedChecksumAlgorithms, required: false, as: many(DAP::ChecksumAlgorithm)
|
53
54
|
|
54
55
|
# The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the RestartRequest.
|
55
|
-
property :supportsRestartRequest, required: false
|
56
|
+
property :supportsRestartRequest, required: false, as: 'boolean'
|
56
57
|
|
57
58
|
# The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request.
|
58
|
-
property :supportsExceptionOptions, required: false
|
59
|
+
property :supportsExceptionOptions, required: false, as: 'boolean'
|
59
60
|
|
60
61
|
# The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest.
|
61
|
-
property :supportsValueFormattingOptions, required: false
|
62
|
+
property :supportsValueFormattingOptions, required: false, as: 'boolean'
|
62
63
|
|
63
64
|
# The debug adapter supports the 'exceptionInfo' request.
|
64
|
-
property :supportsExceptionInfoRequest, required: false
|
65
|
+
property :supportsExceptionInfoRequest, required: false, as: 'boolean'
|
65
66
|
|
66
67
|
# The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request.
|
67
|
-
property :supportTerminateDebuggee, required: false
|
68
|
+
property :supportTerminateDebuggee, required: false, as: 'boolean'
|
68
69
|
|
69
70
|
# 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.
|
70
|
-
property :supportsDelayedStackTraceLoading, required: false
|
71
|
+
property :supportsDelayedStackTraceLoading, required: false, as: 'boolean'
|
71
72
|
|
72
73
|
# The debug adapter supports the 'loadedSources' request.
|
73
|
-
property :supportsLoadedSourcesRequest, required: false
|
74
|
+
property :supportsLoadedSourcesRequest, required: false, as: 'boolean'
|
74
75
|
|
75
76
|
# The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint.
|
76
|
-
property :supportsLogPoints, required: false
|
77
|
+
property :supportsLogPoints, required: false, as: 'boolean'
|
77
78
|
|
78
79
|
# The debug adapter supports the 'terminateThreads' request.
|
79
|
-
property :supportsTerminateThreadsRequest, required: false
|
80
|
+
property :supportsTerminateThreadsRequest, required: false, as: 'boolean'
|
80
81
|
|
81
82
|
# The debug adapter supports the 'setExpression' request.
|
82
|
-
property :supportsSetExpression, required: false
|
83
|
+
property :supportsSetExpression, required: false, as: 'boolean'
|
83
84
|
|
84
85
|
# The debug adapter supports the 'terminate' request.
|
85
|
-
property :supportsTerminateRequest, required: false
|
86
|
+
property :supportsTerminateRequest, required: false, as: 'boolean'
|
86
87
|
|
87
88
|
# The debug adapter supports data breakpoints.
|
88
|
-
property :supportsDataBreakpoints, required: false
|
89
|
+
property :supportsDataBreakpoints, required: false, as: 'boolean'
|
89
90
|
|
90
91
|
# The debug adapter supports the 'readMemory' request.
|
91
|
-
property :supportsReadMemoryRequest, required: false
|
92
|
+
property :supportsReadMemoryRequest, required: false, as: 'boolean'
|
92
93
|
|
93
94
|
# The debug adapter supports the 'disassemble' request.
|
94
|
-
property :supportsDisassembleRequest, required: false
|
95
|
+
property :supportsDisassembleRequest, required: false, as: 'boolean'
|
95
96
|
|
96
97
|
# The debug adapter supports the 'cancel' request.
|
97
|
-
property :supportsCancelRequest, required: false
|
98
|
+
property :supportsCancelRequest, required: false, as: 'boolean'
|
98
99
|
|
99
100
|
# The debug adapter supports the 'breakpointLocations' request.
|
100
|
-
property :supportsBreakpointLocationsRequest, required: false
|
101
|
+
property :supportsBreakpointLocationsRequest, required: false, as: 'boolean'
|
101
102
|
|
102
103
|
# The debug adapter supports the 'clipboard' context value in the 'evaluate' request.
|
103
|
-
property :supportsClipboardContext, required: false
|
104
|
+
property :supportsClipboardContext, required: false, as: 'boolean'
|
104
105
|
|
105
106
|
# The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests.
|
106
|
-
property :supportsSteppingGranularity, required: false
|
107
|
+
property :supportsSteppingGranularity, required: false, as: 'boolean'
|
107
108
|
|
108
109
|
# The debug adapter supports adding breakpoints based on instruction references.
|
109
|
-
property :supportsInstructionBreakpoints, required: false
|
110
|
+
property :supportsInstructionBreakpoints, required: false, as: 'boolean'
|
110
111
|
end
|