ruby-dap 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/AUTHORS +7 -0
- data/LICENSE +201 -0
- data/lib/dap.rb +21 -0
- data/lib/dap/attach_request_arguments.rb +6 -0
- data/lib/dap/base.rb +145 -0
- data/lib/dap/breakpoint.rb +36 -0
- data/lib/dap/breakpoint_event_body.rb +10 -0
- data/lib/dap/breakpoint_location.rb +13 -0
- data/lib/dap/breakpoint_locations_arguments.rb +18 -0
- data/lib/dap/breakpoint_locations_response_body.rb +6 -0
- data/lib/dap/cancel_arguments.rb +9 -0
- data/lib/dap/capabilities.rb +110 -0
- data/lib/dap/capabilities_event_body.rb +6 -0
- data/lib/dap/checksum.rb +9 -0
- data/lib/dap/checksum_algorithm.rb +6 -0
- data/lib/dap/column_descriptor.rb +17 -0
- data/lib/dap/completion_item.rb +33 -0
- data/lib/dap/completion_item_type.rb +21 -0
- data/lib/dap/completions_arguments.rb +13 -0
- data/lib/dap/completions_response_body.rb +6 -0
- data/lib/dap/continue_arguments.rb +5 -0
- data/lib/dap/continue_response_body.rb +5 -0
- data/lib/dap/continued_event_body.rb +7 -0
- data/lib/dap/data_breakpoint.rb +16 -0
- data/lib/dap/data_breakpoint_access_type.rb +5 -0
- data/lib/dap/data_breakpoint_info_arguments.rb +8 -0
- data/lib/dap/data_breakpoint_info_response_body.rb +15 -0
- data/lib/dap/disassemble_arguments.rb +17 -0
- data/lib/dap/disassemble_response_body.rb +6 -0
- data/lib/dap/disassembled_instruction.rb +32 -0
- data/lib/dap/disconnect_arguments.rb +9 -0
- data/lib/dap/encoding.rb +47 -0
- data/lib/dap/enum.rb +28 -0
- data/lib/dap/error_response_body.rb +6 -0
- data/lib/dap/evaluate_arguments.rb +23 -0
- data/lib/dap/evaluate_response_body.rb +32 -0
- data/lib/dap/event.rb +42 -0
- data/lib/dap/exception_break_mode.rb +6 -0
- data/lib/dap/exception_breakpoints_filter.rb +10 -0
- data/lib/dap/exception_details.rb +21 -0
- data/lib/dap/exception_info_arguments.rb +4 -0
- data/lib/dap/exception_info_response_body.rb +16 -0
- data/lib/dap/exception_options.rb +11 -0
- data/lib/dap/exception_path_segment.rb +7 -0
- data/lib/dap/exited_event_body.rb +4 -0
- data/lib/dap/function_breakpoint.rb +13 -0
- data/lib/dap/goto_arguments.rb +7 -0
- data/lib/dap/goto_target.rb +22 -0
- data/lib/dap/goto_targets_arguments.rb +12 -0
- data/lib/dap/goto_targets_response_body.rb +6 -0
- data/lib/dap/initialize_request_arguments.rb +41 -0
- data/lib/dap/instruction_breakpoint.rb +18 -0
- data/lib/dap/invalidated_event_body.rb +10 -0
- data/lib/dap/launch_request_arguments.rb +9 -0
- data/lib/dap/loaded_source_event_body.rb +10 -0
- data/lib/dap/loaded_sources_response_body.rb +6 -0
- data/lib/dap/message.rb +23 -0
- data/lib/dap/module.rb +28 -0
- data/lib/dap/module_event_body.rb +10 -0
- data/lib/dap/modules_arguments.rb +7 -0
- data/lib/dap/modules_response_body.rb +9 -0
- data/lib/dap/next_arguments.rb +9 -0
- data/lib/dap/output_event_body.rb +36 -0
- data/lib/dap/pause_arguments.rb +4 -0
- data/lib/dap/process_event_body.rb +21 -0
- data/lib/dap/progress_end_event_body.rb +7 -0
- data/lib/dap/progress_start_event_body.rb +24 -0
- data/lib/dap/progress_update_event_body.rb +10 -0
- data/lib/dap/protocol_message.rb +38 -0
- data/lib/dap/read_memory_arguments.rb +10 -0
- data/lib/dap/read_memory_response_body.rb +12 -0
- data/lib/dap/relation.rb +28 -0
- data/lib/dap/request.rb +91 -0
- data/lib/dap/response.rb +86 -0
- data/lib/dap/restart_frame_arguments.rb +4 -0
- data/lib/dap/reverse_continue_arguments.rb +4 -0
- data/lib/dap/run_in_terminal_request_arguments.rb +17 -0
- data/lib/dap/run_in_terminal_response_body.rb +7 -0
- data/lib/dap/scope.rb +43 -0
- data/lib/dap/scopes_arguments.rb +4 -0
- data/lib/dap/scopes_response_body.rb +6 -0
- data/lib/dap/set_breakpoints_arguments.rb +16 -0
- data/lib/dap/set_breakpoints_response_body.rb +7 -0
- data/lib/dap/set_data_breakpoints_arguments.rb +6 -0
- data/lib/dap/set_data_breakpoints_response_body.rb +6 -0
- data/lib/dap/set_exception_breakpoints_arguments.rb +10 -0
- data/lib/dap/set_expression_arguments.rb +15 -0
- data/lib/dap/set_expression_response_body.rb +27 -0
- data/lib/dap/set_function_breakpoints_arguments.rb +6 -0
- data/lib/dap/set_function_breakpoints_response_body.rb +6 -0
- data/lib/dap/set_instruction_breakpoints_arguments.rb +6 -0
- data/lib/dap/set_instruction_breakpoints_response_body.rb +6 -0
- data/lib/dap/set_variable_arguments.rb +15 -0
- data/lib/dap/set_variable_response_body.rb +21 -0
- data/lib/dap/source.rb +35 -0
- data/lib/dap/source_arguments.rb +10 -0
- data/lib/dap/source_breakpoint.rb +21 -0
- data/lib/dap/source_response_body.rb +7 -0
- data/lib/dap/stack_frame.rb +36 -0
- data/lib/dap/stack_frame_format.rb +24 -0
- data/lib/dap/stack_trace_arguments.rb +16 -0
- data/lib/dap/stack_trace_response_body.rb +10 -0
- data/lib/dap/step_back_arguments.rb +9 -0
- data/lib/dap/step_in_arguments.rb +12 -0
- data/lib/dap/step_in_target.rb +7 -0
- data/lib/dap/step_in_targets_arguments.rb +4 -0
- data/lib/dap/step_in_targets_response_body.rb +6 -0
- data/lib/dap/step_out_arguments.rb +9 -0
- data/lib/dap/stepping_granularity.rb +5 -0
- data/lib/dap/stopped_event_body.rb +23 -0
- data/lib/dap/terminate_arguments.rb +4 -0
- data/lib/dap/terminate_threads_arguments.rb +4 -0
- data/lib/dap/terminated_event_body.rb +5 -0
- data/lib/dap/thread.rb +7 -0
- data/lib/dap/thread_event_body.rb +8 -0
- data/lib/dap/threads_response_body.rb +6 -0
- data/lib/dap/value_format.rb +4 -0
- data/lib/dap/variable.rb +34 -0
- data/lib/dap/variable_presentation_hint.rb +34 -0
- data/lib/dap/variables_arguments.rb +20 -0
- data/lib/dap/variables_response_body.rb +6 -0
- metadata +163 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative 'module'
|
2
|
+
|
3
|
+
class DAP::ModuleEventBody < DAP::Base
|
4
|
+
# The reason for the event.
|
5
|
+
# Values: 'new', 'changed', 'removed', etc.
|
6
|
+
property :reason # 'new' | 'changed' | 'removed'
|
7
|
+
|
8
|
+
# The new, changed, or removed module. In case of 'removed' only the module id is used.
|
9
|
+
property :module, as: DAP::Module
|
10
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class DAP::ModulesArguments < DAP::Base
|
2
|
+
# The index of the first module to return; if omitted modules start at 0.
|
3
|
+
property :startModule, required: false
|
4
|
+
|
5
|
+
# The number of modules to return. If moduleCount is not specified or 0, all modules are returned.
|
6
|
+
property :moduleCount, required: false
|
7
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require_relative 'stepping_granularity'
|
2
|
+
|
3
|
+
class DAP::NextArguments < DAP::Base
|
4
|
+
# Execute 'next' for this thread.
|
5
|
+
property :threadId
|
6
|
+
|
7
|
+
# Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed.
|
8
|
+
property :granularity, required: false, as: DAP::SteppingGranularity
|
9
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require_relative 'source'
|
2
|
+
|
3
|
+
class DAP::OutputEventBody < DAP::Base
|
4
|
+
# The output category. If not specified, 'console' is assumed.
|
5
|
+
# Values: 'console', 'stdout', 'stderr', 'telemetry', etc.
|
6
|
+
property :category, required: false # 'console' | 'stdout' | 'stderr' | 'telemetry' | string
|
7
|
+
|
8
|
+
# The output to report.
|
9
|
+
property :output
|
10
|
+
|
11
|
+
# Support for keeping an output log organized by grouping related messages.
|
12
|
+
# Values:
|
13
|
+
# 'start': Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.
|
14
|
+
# The 'output' attribute becomes the name of the group and is not indented.
|
15
|
+
# 'startCollapsed': 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).
|
16
|
+
# The 'output' attribute becomes the name of the group and is not indented.
|
17
|
+
# 'end': End the current group and decreases the indentation of subsequent output events.
|
18
|
+
# A non empty 'output' attribute is shown as the unindented end of the group.
|
19
|
+
# etc.
|
20
|
+
property :group, required: false # 'start' | 'startCollapsed' | 'end'
|
21
|
+
|
22
|
+
# 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).
|
23
|
+
property :variablesReference, required: false
|
24
|
+
|
25
|
+
# An optional source location where the output was produced.
|
26
|
+
property :source, required: false, as: DAP::Source
|
27
|
+
|
28
|
+
# An optional source location line where the output was produced.
|
29
|
+
property :line, required: false
|
30
|
+
|
31
|
+
# An optional source location column where the output was produced.
|
32
|
+
property :column, required: false
|
33
|
+
|
34
|
+
# Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format.
|
35
|
+
property :data, required: false
|
36
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class DAP::ProcessEventBody < DAP::Base
|
2
|
+
# The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js.
|
3
|
+
property :name
|
4
|
+
|
5
|
+
# The system process id of the debugged process. This property will be missing for non-system processes.
|
6
|
+
property :systemProcessId, required: false
|
7
|
+
|
8
|
+
# If true, the process is running on the same computer as the debug adapter.
|
9
|
+
property :isLocalProcess, required: false
|
10
|
+
|
11
|
+
# Describes how the debug engine started debugging this process.
|
12
|
+
# Values:
|
13
|
+
# 'launch': Process was launched under the debugger.
|
14
|
+
# 'attach': Debugger attached to an existing process.
|
15
|
+
# 'attachForSuspendedLaunch': A project launcher component has launched a new process in a suspended state and then asked the debugger to attach.
|
16
|
+
# etc.
|
17
|
+
property :startMethod, required: false # 'launch' | 'attach' | 'attachForSuspendedLaunch'
|
18
|
+
|
19
|
+
# The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display.
|
20
|
+
property :pointerSize, required: false
|
21
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class DAP::ProgressEndEventBody < DAP::Base
|
2
|
+
# The ID that was introduced in the initial 'ProgressStartEvent'.
|
3
|
+
property :progressId
|
4
|
+
|
5
|
+
# Optional, more detailed progress message. If omitted, the previous message (if any) is used.
|
6
|
+
property :message, required: false
|
7
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class DAP::ProgressStartEventBody < DAP::Base
|
2
|
+
# An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.
|
3
|
+
# IDs must be unique within a debug session.
|
4
|
+
property :progressId
|
5
|
+
|
6
|
+
# Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation.
|
7
|
+
property :title
|
8
|
+
|
9
|
+
# The request ID that this progress report is related to. If specified a debug adapter is expected to emit
|
10
|
+
# progress events for the long running request until the request has been either completed or cancelled.
|
11
|
+
# If the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter.
|
12
|
+
property :requestId, required: false
|
13
|
+
|
14
|
+
# If true, the request that reports progress may be canceled with a 'cancel' request.
|
15
|
+
# So this property basically controls whether the client should use UX that supports cancellation.
|
16
|
+
# Clients that don't support cancellation are allowed to ignore the setting.
|
17
|
+
property :cancellable, required: false
|
18
|
+
|
19
|
+
# Optional, more detailed progress message.
|
20
|
+
property :message, required: false
|
21
|
+
|
22
|
+
# Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
|
23
|
+
property :percentage, required: false
|
24
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class DAP::ProgressUpdateEventBody < DAP::Base
|
2
|
+
# The ID that was introduced in the initial 'progressStart' event.
|
3
|
+
property :progressId
|
4
|
+
|
5
|
+
# Optional, more detailed progress message. If omitted, the previous message (if any) is used.
|
6
|
+
property :message, required: false
|
7
|
+
|
8
|
+
# Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown.
|
9
|
+
property :percentage, required: false
|
10
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
class DAP::ProtocolMessage < DAP::Base
|
2
|
+
def self.types
|
3
|
+
@types ||= {
|
4
|
+
request: DAP::Request,
|
5
|
+
event: DAP::Event,
|
6
|
+
response: DAP::Response,
|
7
|
+
}
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.from(values)
|
11
|
+
build(values) do |v|
|
12
|
+
key = v[:type]&.to_sym
|
13
|
+
raise "#{name}.type missing" if key.nil?
|
14
|
+
raise "Unknown #{name}.type #{key}" unless types.key?(key)
|
15
|
+
|
16
|
+
types[key]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
property :seq, :type
|
21
|
+
|
22
|
+
def initialize(values)
|
23
|
+
super(values)
|
24
|
+
@seq = values[:seq] || DAP::ProtocolMessage.seq
|
25
|
+
@type = self.class.type
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def self.seq
|
31
|
+
@seq ||= 0
|
32
|
+
@seq += 1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
require_relative 'request'
|
37
|
+
require_relative 'event'
|
38
|
+
require_relative 'response'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class DAP::ReadMemoryArguments < DAP::Base
|
2
|
+
# Memory reference to the base location from which data should be read.
|
3
|
+
property :memoryReference
|
4
|
+
|
5
|
+
# Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative.
|
6
|
+
property :offset, required: false
|
7
|
+
|
8
|
+
# Number of bytes to read at the specified location and offset.
|
9
|
+
property :count
|
10
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class DAP::ReadMemoryResponseBody < DAP::Base
|
2
|
+
# The address of the first byte of data returned.
|
3
|
+
# Treated as a hex value if prefixed with '0x', or as a decimal value otherwise.
|
4
|
+
property :address
|
5
|
+
|
6
|
+
# The number of unreadable bytes encountered after the last successfully read byte.
|
7
|
+
# This can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed.
|
8
|
+
property :unreadableBytes, required: false
|
9
|
+
|
10
|
+
# The bytes read from memory, encoded using base64.
|
11
|
+
property :data, required: false
|
12
|
+
end
|
data/lib/dap/relation.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
module DAP::Relation
|
2
|
+
def self.supported!(klazz)
|
3
|
+
raise "Unsupported property class #{klazz}" unless klazz < DAP::Base || klazz < DAP::Enum
|
4
|
+
end
|
5
|
+
|
6
|
+
class Many
|
7
|
+
attr_reader :klazz
|
8
|
+
|
9
|
+
def initialize(klazz)
|
10
|
+
DAP::Relation.supported!(klazz)
|
11
|
+
@klazz = klazz
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class OneOf
|
16
|
+
attr_reader :types, :key
|
17
|
+
|
18
|
+
def initialize(types)
|
19
|
+
types.values.each { |k| DAP::Relation.supported!(k) }
|
20
|
+
@types = types
|
21
|
+
end
|
22
|
+
|
23
|
+
def with(key)
|
24
|
+
@key = key
|
25
|
+
self
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/dap/request.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
require_relative 'cancel_arguments'
|
2
|
+
require_relative 'run_in_terminal_request_arguments'
|
3
|
+
require_relative 'initialize_request_arguments'
|
4
|
+
require_relative 'launch_request_arguments'
|
5
|
+
require_relative 'attach_request_arguments'
|
6
|
+
require_relative 'disconnect_arguments'
|
7
|
+
require_relative 'terminate_arguments'
|
8
|
+
require_relative 'breakpoint_locations_arguments'
|
9
|
+
require_relative 'set_breakpoints_arguments'
|
10
|
+
require_relative 'set_function_breakpoints_arguments'
|
11
|
+
require_relative 'set_exception_breakpoints_arguments'
|
12
|
+
require_relative 'data_breakpoint_info_arguments'
|
13
|
+
require_relative 'set_data_breakpoints_arguments'
|
14
|
+
require_relative 'set_instruction_breakpoints_arguments'
|
15
|
+
require_relative 'continue_arguments'
|
16
|
+
require_relative 'next_arguments'
|
17
|
+
require_relative 'step_in_arguments'
|
18
|
+
require_relative 'step_out_arguments'
|
19
|
+
require_relative 'step_back_arguments'
|
20
|
+
require_relative 'reverse_continue_arguments'
|
21
|
+
require_relative 'restart_frame_arguments'
|
22
|
+
require_relative 'goto_arguments'
|
23
|
+
require_relative 'pause_arguments'
|
24
|
+
require_relative 'stack_trace_arguments'
|
25
|
+
require_relative 'scopes_arguments'
|
26
|
+
require_relative 'variables_arguments'
|
27
|
+
require_relative 'set_variable_arguments'
|
28
|
+
require_relative 'source_arguments'
|
29
|
+
require_relative 'terminate_threads_arguments'
|
30
|
+
require_relative 'modules_arguments'
|
31
|
+
require_relative 'evaluate_arguments'
|
32
|
+
require_relative 'set_expression_arguments'
|
33
|
+
require_relative 'step_in_targets_arguments'
|
34
|
+
require_relative 'goto_targets_arguments'
|
35
|
+
require_relative 'completions_arguments'
|
36
|
+
require_relative 'exception_info_arguments'
|
37
|
+
require_relative 'read_memory_arguments'
|
38
|
+
require_relative 'disassemble_arguments'
|
39
|
+
|
40
|
+
class DAP::Request < DAP::ProtocolMessage
|
41
|
+
def self.type
|
42
|
+
'request'
|
43
|
+
end
|
44
|
+
|
45
|
+
property :command
|
46
|
+
|
47
|
+
property :arguments, as: one_of(
|
48
|
+
cancel: DAP::CancelArguments,
|
49
|
+
runInTerminal: DAP::RunInTerminalRequestArguments,
|
50
|
+
initialize: DAP::InitializeRequestArguments,
|
51
|
+
configurationDone: empty,
|
52
|
+
launch: DAP::LaunchRequestArguments,
|
53
|
+
attach: DAP::AttachRequestArguments,
|
54
|
+
restart: empty,
|
55
|
+
disconnect: DAP::DisconnectArguments,
|
56
|
+
terminate: DAP::TerminateArguments,
|
57
|
+
breakpointLocations: DAP::BreakpointLocationsArguments,
|
58
|
+
setBreakpoints: DAP::SetBreakpointsArguments,
|
59
|
+
setFunctionBreakpoints: DAP::SetFunctionBreakpointsArguments,
|
60
|
+
setExceptionBreakpoints: DAP::SetExceptionBreakpointsArguments,
|
61
|
+
dataBreakpointInfo: DAP::DataBreakpointInfoArguments,
|
62
|
+
setDataBreakpoints: DAP::SetDataBreakpointsArguments,
|
63
|
+
setInstructionBreakpoints: DAP::SetInstructionBreakpointsArguments,
|
64
|
+
continue: DAP::ContinueArguments,
|
65
|
+
next: DAP::NextArguments,
|
66
|
+
stepIn: DAP::StepInArguments,
|
67
|
+
stepOut: DAP::StepOutArguments,
|
68
|
+
stepBack: DAP::StepBackArguments,
|
69
|
+
reverseContinue: DAP::ReverseContinueArguments,
|
70
|
+
restartFrame: DAP::RestartFrameArguments,
|
71
|
+
goto: DAP::GotoArguments,
|
72
|
+
pause: DAP::PauseArguments,
|
73
|
+
stackTrace: DAP::StackTraceArguments,
|
74
|
+
scopes: DAP::ScopesArguments,
|
75
|
+
variables: DAP::VariablesArguments,
|
76
|
+
setVariable: DAP::SetVariableArguments,
|
77
|
+
source: DAP::SourceArguments,
|
78
|
+
threads: empty,
|
79
|
+
terminateThreads: DAP::TerminateThreadsArguments,
|
80
|
+
modules: DAP::ModulesArguments,
|
81
|
+
loadedSources: empty,
|
82
|
+
evaluate: DAP::EvaluateArguments,
|
83
|
+
setExpression: DAP::SetExpressionArguments,
|
84
|
+
stepInTargets: DAP::StepInTargetsArguments,
|
85
|
+
gotoTargets: DAP::GotoTargetsArguments,
|
86
|
+
completions: DAP::CompletionsArguments,
|
87
|
+
exceptionInfo: DAP::ExceptionInfoArguments,
|
88
|
+
readMemory: DAP::ReadMemoryArguments,
|
89
|
+
disassemble: DAP::DisassembleArguments,
|
90
|
+
).with(:command)
|
91
|
+
end
|
data/lib/dap/response.rb
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
require_relative 'capabilities'
|
2
|
+
require_relative 'error_response_body'
|
3
|
+
require_relative 'run_in_terminal_response_body'
|
4
|
+
require_relative 'breakpoint_locations_response_body'
|
5
|
+
require_relative 'set_breakpoints_response_body'
|
6
|
+
require_relative 'set_function_breakpoints_response_body'
|
7
|
+
require_relative 'data_breakpoint_info_response_body'
|
8
|
+
require_relative 'set_data_breakpoints_response_body'
|
9
|
+
require_relative 'set_instruction_breakpoints_response_body'
|
10
|
+
require_relative 'continue_response_body'
|
11
|
+
require_relative 'stack_trace_response_body'
|
12
|
+
require_relative 'scopes_response_body'
|
13
|
+
require_relative 'variables_response_body'
|
14
|
+
require_relative 'set_variable_response_body'
|
15
|
+
require_relative 'source_response_body'
|
16
|
+
require_relative 'threads_response_body'
|
17
|
+
require_relative 'modules_response_body'
|
18
|
+
require_relative 'loaded_sources_response_body'
|
19
|
+
require_relative 'evaluate_response_body'
|
20
|
+
require_relative 'set_expression_response_body'
|
21
|
+
require_relative 'step_in_targets_response_body'
|
22
|
+
require_relative 'goto_targets_response_body'
|
23
|
+
require_relative 'completions_response_body'
|
24
|
+
require_relative 'exception_info_response_body'
|
25
|
+
require_relative 'read_memory_response_body'
|
26
|
+
require_relative 'disassemble_response_body'
|
27
|
+
|
28
|
+
class DAP::Response < DAP::ProtocolMessage
|
29
|
+
def self.type
|
30
|
+
'response'
|
31
|
+
end
|
32
|
+
|
33
|
+
def validate!
|
34
|
+
return unless success
|
35
|
+
|
36
|
+
super
|
37
|
+
end
|
38
|
+
|
39
|
+
property :request_seq, :success, :command, :message, :body
|
40
|
+
|
41
|
+
property :body, as: one_of(
|
42
|
+
initialize: DAP::Capabilities,
|
43
|
+
error: DAP::ErrorResponseBody,
|
44
|
+
cancel: empty,
|
45
|
+
runInTerminal: DAP::RunInTerminalResponseBody,
|
46
|
+
configurationDone: empty,
|
47
|
+
launch: empty,
|
48
|
+
attach: empty,
|
49
|
+
restart: empty,
|
50
|
+
disconnect: empty,
|
51
|
+
terminate: empty,
|
52
|
+
breakpointLocations: DAP::BreakpointLocationsResponseBody,
|
53
|
+
setBreakpoints: DAP::SetBreakpointsResponseBody,
|
54
|
+
setFunctionBreakpoints: DAP::SetFunctionBreakpointsResponseBody,
|
55
|
+
setExceptionBreakpoints: empty,
|
56
|
+
dataBreakpointInfo: DAP::DataBreakpointInfoResponseBody,
|
57
|
+
setDataBreakpoints: DAP::SetDataBreakpointsResponseBody,
|
58
|
+
setInstructionBreakpoints: DAP::SetInstructionBreakpointsResponseBody,
|
59
|
+
continue: DAP::ContinueResponseBody,
|
60
|
+
next: empty,
|
61
|
+
stepIn: empty,
|
62
|
+
stepOut: empty,
|
63
|
+
stepBack: empty,
|
64
|
+
reverseContinue: empty,
|
65
|
+
restartFrame: empty,
|
66
|
+
goto: empty,
|
67
|
+
pause: empty,
|
68
|
+
stackTrace: DAP::StackTraceResponseBody,
|
69
|
+
scopes: DAP::ScopesResponseBody,
|
70
|
+
variables: DAP::VariablesResponseBody,
|
71
|
+
setVariable: DAP::SetVariableResponseBody,
|
72
|
+
source: DAP::SourceResponseBody,
|
73
|
+
threads: DAP::ThreadsResponseBody,
|
74
|
+
terminateThreads: empty,
|
75
|
+
modules: DAP::ModulesResponseBody,
|
76
|
+
loadedSources: DAP::LoadedSourcesResponseBody,
|
77
|
+
evaluate: DAP::EvaluateResponseBody,
|
78
|
+
setExpression: DAP::SetExpressionResponseBody,
|
79
|
+
stepInTargets: DAP::StepInTargetsResponseBody,
|
80
|
+
gotoTargets: DAP::GotoTargetsResponseBody,
|
81
|
+
completions: DAP::CompletionsResponseBody,
|
82
|
+
exceptionInfo: DAP::ExceptionInfoResponseBody,
|
83
|
+
readMemory: DAP::ReadMemoryResponseBody,
|
84
|
+
disassemble: DAP::DisassembleResponseBody,
|
85
|
+
).with(:command)
|
86
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class DAP::RunInTerminalRequestArguments < DAP::Base
|
2
|
+
# What kind of terminal to launch.
|
3
|
+
# Values: 'integrated', 'external', etc.
|
4
|
+
property :kind, required: false # 'integrated' | 'external'
|
5
|
+
|
6
|
+
# Optional title of the terminal.
|
7
|
+
property :title, required: false
|
8
|
+
|
9
|
+
# Working directory of the command.
|
10
|
+
property :cwd
|
11
|
+
|
12
|
+
# List of arguments. The first argument is the command to run.
|
13
|
+
property :args
|
14
|
+
|
15
|
+
# Environment key-value pairs that are added to or removed from the default environment.
|
16
|
+
property :env, required: false # { [key: string]: string | null; }
|
17
|
+
end
|