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
data/lib/dap/event.rb
CHANGED
@@ -14,11 +14,15 @@ require_relative 'stopped_event_body'
|
|
14
14
|
require_relative 'terminated_event_body'
|
15
15
|
require_relative 'thread_event_body'
|
16
16
|
|
17
|
+
# Base class of requests, responses, and events.
|
17
18
|
class DAP::Event < DAP::ProtocolMessage
|
19
|
+
# (see ProtocolMessage#type)
|
18
20
|
def self.type
|
19
21
|
'event'
|
20
22
|
end
|
21
23
|
|
24
|
+
# Allowed event kinds and their body types.
|
25
|
+
# @return [Hash<Symbol, Class>]
|
22
26
|
def self.bodies
|
23
27
|
@bodies ||= one_of(
|
24
28
|
initialized: empty,
|
@@ -40,6 +44,9 @@ class DAP::Event < DAP::ProtocolMessage
|
|
40
44
|
)
|
41
45
|
end
|
42
46
|
|
47
|
+
# Type of event.
|
43
48
|
property :event
|
49
|
+
|
50
|
+
# Event-specific information.
|
44
51
|
property :body, as: bodies.with(:event)
|
45
52
|
end
|
@@ -1,6 +1,12 @@
|
|
1
|
+
# This enumeration defines all possible conditions when a thrown exception should
|
2
|
+
# result in a break.
|
1
3
|
class DAP::ExceptionBreakMode < DAP::Enum
|
4
|
+
# never breaks
|
2
5
|
NEVER = new('never')
|
6
|
+
# always breaks
|
3
7
|
ALWAYS = new('always')
|
8
|
+
# breaks when exception unhandled
|
4
9
|
UNHANDLED = new('unhandled')
|
10
|
+
# breaks if the exception is not handled by user code
|
5
11
|
USERUNHANDLED = new('userUnhandled')
|
6
12
|
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# An ExceptionBreakpointsFilter is shown in the UI as an option for configuring
|
2
|
+
# how exceptions are dealt with.
|
1
3
|
class DAP::ExceptionBreakpointsFilter < DAP::Base
|
2
4
|
# The internal ID of the filter. This value is passed to the setExceptionBreakpoints request.
|
3
|
-
property :filter
|
5
|
+
property :filter, as: 'string'
|
4
6
|
|
5
7
|
# The name of the filter. This will be shown in the UI.
|
6
|
-
property :label
|
8
|
+
property :label, as: 'string'
|
7
9
|
|
8
10
|
# Initial value of the filter. If not specified a value 'false' is assumed.
|
9
|
-
property :default, required: false
|
11
|
+
property :default, required: false, as: 'boolean'
|
10
12
|
end
|
@@ -1,20 +1,21 @@
|
|
1
1
|
require_relative 'exception_details'
|
2
2
|
|
3
|
+
# Detailed information about an exception that has occurred.
|
3
4
|
class DAP::ExceptionDetails < DAP::Base
|
4
5
|
# Message contained in the exception.
|
5
|
-
property :message, required: false
|
6
|
+
property :message, required: false, as: 'string'
|
6
7
|
|
7
8
|
# Short type name of the exception object.
|
8
|
-
property :typeName, required: false
|
9
|
+
property :typeName, required: false, as: 'string'
|
9
10
|
|
10
11
|
# Fully-qualified type name of the exception object.
|
11
|
-
property :fullTypeName, required: false
|
12
|
+
property :fullTypeName, required: false, as: 'string'
|
12
13
|
|
13
14
|
# Optional expression that can be evaluated in the current scope to obtain the exception object.
|
14
|
-
property :evaluateName, required: false
|
15
|
+
property :evaluateName, required: false, as: 'string'
|
15
16
|
|
16
17
|
# Stack trace at the time the exception was thrown.
|
17
|
-
property :stackTrace, required: false
|
18
|
+
property :stackTrace, required: false, as: 'string'
|
18
19
|
|
19
20
|
# Details of the exception contained by this exception, if any.
|
20
21
|
property :innerException, required: false, as: many(DAP::ExceptionDetails)
|
@@ -1,12 +1,13 @@
|
|
1
1
|
require_relative 'exception_break_mode'
|
2
2
|
require_relative 'exception_details'
|
3
3
|
|
4
|
+
# Response to ‘exceptionInfo’ request.
|
4
5
|
class DAP::ExceptionInfoResponseBody < DAP::Base
|
5
6
|
# ID of the exception that was thrown.
|
6
|
-
property :exceptionId
|
7
|
+
property :exceptionId, as: 'string'
|
7
8
|
|
8
9
|
# Descriptive text for the exception provided by the debug adapter.
|
9
|
-
property :description, required: false
|
10
|
+
property :description, required: false, as: 'string'
|
10
11
|
|
11
12
|
# Mode that caused the exception notification to be raised.
|
12
13
|
property :breakMode, as: DAP::ExceptionBreakMode
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative 'exception_path_segment'
|
2
2
|
require_relative 'exception_break_mode'
|
3
3
|
|
4
|
+
# An ExceptionOptions assigns configuration options to a set of exceptions.
|
4
5
|
class DAP::ExceptionOptions < DAP::Base
|
5
6
|
# A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.
|
6
7
|
# By convention the first segment of the path is a category that is used to group exceptions in the UI.
|
@@ -1,7 +1,11 @@
|
|
1
|
+
# An ExceptionPathSegment represents a segment in a path that is used to match
|
2
|
+
# leafs or nodes in a tree of exceptions. If a segment consists of more than one
|
3
|
+
# name, it matches the names provided if ‘negate’ is false or missing or it
|
4
|
+
# matches anything except the names provided if ‘negate’ is true.
|
1
5
|
class DAP::ExceptionPathSegment < DAP::Base
|
2
6
|
# If false or missing this segment matches the names provided, otherwise it matches anything except the names provided.
|
3
|
-
property :negate, required: false
|
7
|
+
property :negate, required: false, as: 'boolean'
|
4
8
|
|
5
9
|
# Depending on the value of 'negate' the names that should match or not match.
|
6
|
-
property :names
|
10
|
+
property :names, as: 'string[]'
|
7
11
|
end
|
@@ -1,13 +1,14 @@
|
|
1
|
+
# Properties of a breakpoint passed to the setFunctionBreakpoints request.
|
1
2
|
class DAP::FunctionBreakpoint < DAP::Base
|
2
3
|
# The name of the function.
|
3
|
-
property :name
|
4
|
+
property :name, as: 'string'
|
4
5
|
|
5
6
|
# An optional expression for conditional breakpoints.
|
6
7
|
# It is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true.
|
7
|
-
property :condition, required: false
|
8
|
+
property :condition, required: false, as: 'string'
|
8
9
|
|
9
10
|
# An optional expression that controls how many hits of the breakpoint are ignored.
|
10
11
|
# The backend is expected to interpret the expression as needed.
|
11
12
|
# The attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true.
|
12
|
-
property :hitCondition, required: false
|
13
|
+
property :hitCondition, required: false, as: 'string'
|
13
14
|
end
|
data/lib/dap/goto_arguments.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# Arguments for ‘goto’ request.
|
1
2
|
class DAP::GotoArguments < DAP::Base
|
2
3
|
# Set the goto target for this thread.
|
3
|
-
property :threadId
|
4
|
+
property :threadId, as: 'number'
|
4
5
|
|
5
6
|
# The location where the debuggee will continue to run.
|
6
|
-
property :targetId
|
7
|
+
property :targetId, as: 'number'
|
7
8
|
end
|
data/lib/dap/goto_target.rb
CHANGED
@@ -1,22 +1,25 @@
|
|
1
|
+
# A GotoTarget describes a code location that can be used as a target in the
|
2
|
+
# ‘goto’ request. The possible goto targets can be determined via the
|
3
|
+
# ‘gotoTargets’ request.
|
1
4
|
class DAP::GotoTarget < DAP::Base
|
2
5
|
# Unique identifier for a goto target. This is used in the goto request.
|
3
|
-
property :id
|
6
|
+
property :id, as: 'number'
|
4
7
|
|
5
8
|
# The name of the goto target (shown in the UI).
|
6
|
-
property :label
|
9
|
+
property :label, as: 'string'
|
7
10
|
|
8
11
|
# The line of the goto target.
|
9
|
-
property :line
|
12
|
+
property :line, as: 'number'
|
10
13
|
|
11
14
|
# An optional column of the goto target.
|
12
|
-
property :column, required: false
|
15
|
+
property :column, required: false, as: 'number'
|
13
16
|
|
14
17
|
# An optional end line of the range covered by the goto target.
|
15
|
-
property :endLine, required: false
|
18
|
+
property :endLine, required: false, as: 'number'
|
16
19
|
|
17
20
|
# An optional end column of the range covered by the goto target.
|
18
|
-
property :endColumn, required: false
|
21
|
+
property :endColumn, required: false, as: 'number'
|
19
22
|
|
20
23
|
# Optional memory reference for the instruction pointer value represented by this target.
|
21
|
-
property :instructionPointerReference, required: false
|
24
|
+
property :instructionPointerReference, required: false, as: 'string'
|
22
25
|
end
|
@@ -1,12 +1,13 @@
|
|
1
1
|
require_relative 'source'
|
2
2
|
|
3
|
+
# Arguments for ‘gotoTargets’ request.
|
3
4
|
class DAP::GotoTargetsArguments < DAP::Base
|
4
5
|
# The source location for which the goto targets are determined.
|
5
6
|
property :source, as: DAP::Source
|
6
7
|
|
7
8
|
# The line location for which the goto targets are determined.
|
8
|
-
property :line
|
9
|
+
property :line, as: 'number'
|
9
10
|
|
10
11
|
# An optional column location for which the goto targets are determined.
|
11
|
-
property :column, required: false
|
12
|
+
property :column, required: false, as: 'number'
|
12
13
|
end
|
@@ -1,41 +1,42 @@
|
|
1
|
+
# Arguments for ‘initialize’ request.
|
1
2
|
class DAP::InitializeRequestArguments < DAP::Base
|
2
3
|
# The ID of the (frontend) client using this adapter.
|
3
|
-
property :clientID, required: false
|
4
|
+
property :clientID, required: false, as: 'string'
|
4
5
|
|
5
6
|
# The human readable name of the (frontend) client using this adapter.
|
6
|
-
property :clientName, required: false
|
7
|
+
property :clientName, required: false, as: 'string'
|
7
8
|
|
8
9
|
# The ID of the debug adapter.
|
9
|
-
property :adapterID
|
10
|
+
property :adapterID, as: 'string'
|
10
11
|
|
11
12
|
# The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH.
|
12
|
-
property :locale, required: false
|
13
|
+
property :locale, required: false, as: 'string'
|
13
14
|
|
14
15
|
# If true all line numbers are 1-based (default).
|
15
|
-
property :linesStartAt1, required: false
|
16
|
+
property :linesStartAt1, required: false, as: 'boolean'
|
16
17
|
|
17
18
|
# If true all column numbers are 1-based (default).
|
18
|
-
property :columnsStartAt1, required: false
|
19
|
+
property :columnsStartAt1, required: false, as: 'boolean'
|
19
20
|
|
20
21
|
# Determines in what format paths are specified. The default is 'path', which is the native format.
|
21
22
|
# Values: 'path', 'uri', etc.
|
22
|
-
property :pathFormat, required: false
|
23
|
+
property :pathFormat, required: false, as: 'string'
|
23
24
|
|
24
25
|
# Client supports the optional type attribute for variables.
|
25
|
-
property :supportsVariableType, required: false
|
26
|
+
property :supportsVariableType, required: false, as: 'boolean'
|
26
27
|
|
27
28
|
# Client supports the paging of variables.
|
28
|
-
property :supportsVariablePaging, required: false
|
29
|
+
property :supportsVariablePaging, required: false, as: 'boolean'
|
29
30
|
|
30
31
|
# Client supports the runInTerminal request.
|
31
|
-
property :supportsRunInTerminalRequest, required: false
|
32
|
+
property :supportsRunInTerminalRequest, required: false, as: 'boolean'
|
32
33
|
|
33
34
|
# Client supports memory references.
|
34
|
-
property :supportsMemoryReferences, required: false
|
35
|
+
property :supportsMemoryReferences, required: false, as: 'boolean'
|
35
36
|
|
36
37
|
# Client supports progress reporting.
|
37
|
-
property :supportsProgressReporting, required: false
|
38
|
+
property :supportsProgressReporting, required: false, as: 'boolean'
|
38
39
|
|
39
40
|
# Client supports the invalidated event.
|
40
|
-
property :supportsInvalidatedEvent, required: false
|
41
|
+
property :supportsInvalidatedEvent, required: false, as: 'boolean'
|
41
42
|
end
|
@@ -1,18 +1,19 @@
|
|
1
|
+
# Properties of a breakpoint passed to the setInstructionBreakpoints request
|
1
2
|
class DAP::InstructionBreakpoint < DAP::Base
|
2
3
|
# The instruction reference of the breakpoint.
|
3
4
|
# This should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint.
|
4
|
-
property :instructionReference
|
5
|
+
property :instructionReference, as: 'string'
|
5
6
|
|
6
7
|
# An optional offset from the instruction reference.
|
7
8
|
# This can be negative.
|
8
|
-
property :offset, required: false
|
9
|
+
property :offset, required: false, as: 'number'
|
9
10
|
|
10
11
|
# An optional expression for conditional breakpoints.
|
11
12
|
# It is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true.
|
12
|
-
property :condition, required: false
|
13
|
+
property :condition, required: false, as: 'string'
|
13
14
|
|
14
15
|
# An optional expression that controls how many hits of the breakpoint are ignored.
|
15
16
|
# The backend is expected to interpret the expression as needed.
|
16
17
|
# The attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true.
|
17
|
-
property :hitCondition, required: false
|
18
|
+
property :hitCondition, required: false, as: 'string'
|
18
19
|
end
|
@@ -1,10 +1,18 @@
|
|
1
|
+
# This event signals that some state in the debug adapter has changed and requires
|
2
|
+
# that the client needs to re-render the data snapshot previously requested. Debug
|
3
|
+
# adapters do not have to emit this event for runtime changes like stopped or
|
4
|
+
# thread events because in that case the client refetches the new state anyway.
|
5
|
+
# But the event can be used for example to refresh the UI after rendering
|
6
|
+
# formatting has changed in the debug adapter. This event should only be sent if
|
7
|
+
# the debug adapter has received a value true for the ‘supportsInvalidatedEvent’
|
8
|
+
# capability of the ‘initialize’ request.
|
1
9
|
class DAP::InvalidatedEventBody < DAP::Base
|
2
10
|
# 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'.
|
3
|
-
property :areas, required: false
|
11
|
+
property :areas, required: false, as: 'InvalidatedAreas[]'
|
4
12
|
|
5
13
|
# If specified, the client only needs to refetch data related to this thread.
|
6
|
-
property :threadId, required: false
|
14
|
+
property :threadId, required: false, as: 'number'
|
7
15
|
|
8
16
|
# If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored).
|
9
|
-
property :stackFrameId, required: false
|
17
|
+
property :stackFrameId, required: false, as: 'number'
|
10
18
|
end
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# Arguments for ‘launch’ request. Additional attributes are implementation
|
2
|
+
# specific.
|
1
3
|
class DAP::LaunchRequestArguments < DAP::Base
|
2
4
|
# If noDebug is true the launch request should launch the program without enabling debugging.
|
3
|
-
property :noDebug, required: false
|
5
|
+
property :noDebug, required: false, as: 'boolean'
|
4
6
|
|
5
7
|
# Optional data from the previous, restarted session.
|
6
8
|
# The data is sent as the 'restart' attribute of the 'terminated' event.
|
@@ -1,9 +1,11 @@
|
|
1
1
|
require_relative 'source'
|
2
2
|
|
3
|
+
# The event indicates that some source has been added, changed, or removed from
|
4
|
+
# the set of all loaded sources.
|
3
5
|
class DAP::LoadedSourceEventBody < DAP::Base
|
4
6
|
# The reason for the event.
|
5
7
|
# Values: 'new', 'changed', 'removed', etc.
|
6
|
-
property :reason
|
8
|
+
property :reason, as: 'string'
|
7
9
|
|
8
10
|
# The new, changed, or removed source.
|
9
11
|
property :source, as: DAP::Source
|
data/lib/dap/message.rb
CHANGED
@@ -1,23 +1,24 @@
|
|
1
|
+
# A structured message object. Used to return errors from requests.
|
1
2
|
class DAP::Message < DAP::Base
|
2
3
|
# Unique identifier for the message.
|
3
|
-
property :id
|
4
|
+
property :id, as: 'number'
|
4
5
|
|
5
6
|
# A format string for the message. Embedded variables have the form '{name}'.
|
6
7
|
# If variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes.
|
7
|
-
property :format
|
8
|
+
property :format, as: 'string'
|
8
9
|
|
9
10
|
# An object used as a dictionary for looking up the variables in the format string.
|
10
|
-
property :variables, required: false
|
11
|
+
property :variables, required: false
|
11
12
|
|
12
13
|
# If true send to telemetry.
|
13
|
-
property :sendTelemetry, required: false
|
14
|
+
property :sendTelemetry, required: false, as: 'boolean'
|
14
15
|
|
15
16
|
# If true show user.
|
16
|
-
property :showUser, required: false
|
17
|
+
property :showUser, required: false, as: 'boolean'
|
17
18
|
|
18
19
|
# An optional url where additional information about this message can be found.
|
19
|
-
property :url, required: false
|
20
|
+
property :url, required: false, as: 'string'
|
20
21
|
|
21
22
|
# An optional label that is presented to the user as the UI for opening the url.
|
22
|
-
property :urlLabel, required: false
|
23
|
+
property :urlLabel, required: false, as: 'string'
|
23
24
|
end
|
data/lib/dap/module.rb
CHANGED
@@ -1,28 +1,37 @@
|
|
1
|
+
# A Module object represents a row in the modules view. Two attributes are
|
2
|
+
# mandatory: an id identifies a module in the modules view and is used in a
|
3
|
+
# ModuleEvent for identifying a module for adding, updating or deleting. The name
|
4
|
+
# is used to minimally render the module in the UI. Additional attributes can be
|
5
|
+
# added to the module. They will show up in the module View if they have a
|
6
|
+
# corresponding ColumnDescriptor. To avoid an unnecessary proliferation of
|
7
|
+
# additional attributes with similar semantics but different names we recommend to
|
8
|
+
# re-use attributes from the ‘recommended’ list below first, and only introduce
|
9
|
+
# new attributes if nothing appropriate could be found.
|
1
10
|
class DAP::Module < DAP::Base
|
2
11
|
# Unique identifier for the module.
|
3
12
|
property :id
|
4
13
|
|
5
14
|
# A name of the module.
|
6
|
-
property :name
|
15
|
+
property :name, as: 'string'
|
7
16
|
|
8
17
|
# True if the module is optimized.
|
9
|
-
property :isOptimized, required: false
|
18
|
+
property :isOptimized, required: false, as: 'boolean'
|
10
19
|
|
11
20
|
# True if the module is considered 'user code' by a debugger that supports 'Just My Code'.
|
12
|
-
property :isUserCode, required: false
|
21
|
+
property :isUserCode, required: false, as: 'boolean'
|
13
22
|
|
14
23
|
# Version of Module.
|
15
|
-
property :version, required: false
|
24
|
+
property :version, required: false, as: 'string'
|
16
25
|
|
17
26
|
# User understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.
|
18
|
-
property :symbolStatus, required: false
|
27
|
+
property :symbolStatus, required: false, as: 'string'
|
19
28
|
|
20
29
|
# Logical full path to the symbol file. The exact definition is implementation defined.
|
21
|
-
property :symbolFilePath, required: false
|
30
|
+
property :symbolFilePath, required: false, as: 'string'
|
22
31
|
|
23
32
|
# Module created or modified.
|
24
|
-
property :dateTimeStamp, required: false
|
33
|
+
property :dateTimeStamp, required: false, as: 'string'
|
25
34
|
|
26
35
|
# Address range covered by this module.
|
27
|
-
property :addressRange, required: false
|
36
|
+
property :addressRange, required: false, as: 'string'
|
28
37
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
require_relative 'module'
|
2
2
|
|
3
|
+
# The event indicates that some information about a module has changed.
|
3
4
|
class DAP::ModuleEventBody < DAP::Base
|
4
5
|
# The reason for the event.
|
5
6
|
# Values: 'new', 'changed', 'removed', etc.
|
6
|
-
property :reason
|
7
|
+
property :reason, as: 'string'
|
7
8
|
|
8
9
|
# The new, changed, or removed module. In case of 'removed' only the module id is used.
|
9
10
|
property :module, as: DAP::Module
|