Class: DAP::Response

Inherits:
ProtocolMessage show all
Defined in:
lib/dap/response.rb

Overview

Response for a request.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ProtocolMessage

from, #initialize, types

Methods inherited from Base

#[], build, empty, #initialize, many, one_of, properties, property, property_names, #to_wire, transform

Constructor Details

This class inherits a constructor from DAP::ProtocolMessage

Class Method Details

.bodiesHash<Symbol, Class>

Allowed response commands and their body types.

Returns:

  • (Hash<Symbol, Class>)


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/dap/response.rb', line 37

def self.bodies
  @bodies ||= one_of(
    initialize: DAP::Capabilities,
    error: DAP::ErrorResponseBody,
    cancel: empty,
    runInTerminal: DAP::RunInTerminalResponseBody,
    configurationDone: empty,
    launch: empty,
    attach: empty,
    restart: empty,
    disconnect: empty,
    terminate: empty,
    breakpointLocations: DAP::BreakpointLocationsResponseBody,
    setBreakpoints: DAP::SetBreakpointsResponseBody,
    setFunctionBreakpoints: DAP::SetFunctionBreakpointsResponseBody,
    setExceptionBreakpoints: empty,
    dataBreakpointInfo: DAP::DataBreakpointInfoResponseBody,
    setDataBreakpoints: DAP::SetDataBreakpointsResponseBody,
    setInstructionBreakpoints: DAP::SetInstructionBreakpointsResponseBody,
    continue: DAP::ContinueResponseBody,
    next: empty,
    stepIn: empty,
    stepOut: empty,
    stepBack: empty,
    reverseContinue: empty,
    restartFrame: empty,
    goto: empty,
    pause: empty,
    stackTrace: DAP::StackTraceResponseBody,
    scopes: DAP::ScopesResponseBody,
    variables: DAP::VariablesResponseBody,
    setVariable: DAP::SetVariableResponseBody,
    source: DAP::SourceResponseBody,
    threads: DAP::ThreadsResponseBody,
    terminateThreads: empty,
    modules: DAP::ModulesResponseBody,
    loadedSources: DAP::LoadedSourcesResponseBody,
    evaluate: DAP::EvaluateResponseBody,
    setExpression: DAP::SetExpressionResponseBody,
    stepInTargets: DAP::StepInTargetsResponseBody,
    gotoTargets: DAP::GotoTargetsResponseBody,
    completions: DAP::CompletionsResponseBody,
    exceptionInfo: DAP::ExceptionInfoResponseBody,
    readMemory: DAP::ReadMemoryResponseBody,
    disassemble: DAP::DisassembleResponseBody,
  )
end

.typeObject



31
32
33
# File 'lib/dap/response.rb', line 31

def self.type
  'response'
end

Instance Method Details

#validate!Object

Validate property values against their expectations.



86
87
88
89
90
# File 'lib/dap/response.rb', line 86

def validate!
  return unless success

  super
end