1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
9 #include <cm3p/cppdap/protocol.h>
11 #include <cmcppdap/include/dap/optional.h>
12 #include <cmcppdap/include/dap/typeof.h>
13 #include <cmcppdap/include/dap/types.h>
17 // Represents the cmake version.
18 struct CMakeVersion
: public InitializeResponse
20 // The major version number.
22 // The minor version number.
26 // The full version string.
30 DAP_DECLARE_STRUCT_TYPEINFO(CMakeVersion
);
32 // Response to `initialize` request.
33 struct CMakeInitializeResponse
: public Response
35 // The set of additional module information exposed by the debug adapter.
36 optional
<array
<ColumnDescriptor
>> additionalModuleColumns
;
37 // The set of characters that should trigger completion in a REPL. If not
38 // specified, the UI should assume the `.` character.
39 optional
<array
<string
>> completionTriggerCharacters
;
40 // Available exception filter options for the `setExceptionBreakpoints`
42 optional
<array
<ExceptionBreakpointsFilter
>> exceptionBreakpointFilters
;
43 // The debug adapter supports the `suspendDebuggee` attribute on the
44 // `disconnect` request.
45 optional
<boolean
> supportSuspendDebuggee
;
46 // The debug adapter supports the `terminateDebuggee` attribute on the
47 // `disconnect` request.
48 optional
<boolean
> supportTerminateDebuggee
;
49 // Checksum algorithms supported by the debug adapter.
50 optional
<array
<ChecksumAlgorithm
>> supportedChecksumAlgorithms
;
51 // The debug adapter supports the `breakpointLocations` request.
52 optional
<boolean
> supportsBreakpointLocationsRequest
;
53 // The debug adapter supports the `cancel` request.
54 optional
<boolean
> supportsCancelRequest
;
55 // The debug adapter supports the `clipboard` context value in the `evaluate`
57 optional
<boolean
> supportsClipboardContext
;
58 // The debug adapter supports the `completions` request.
59 optional
<boolean
> supportsCompletionsRequest
;
60 // The debug adapter supports conditional breakpoints.
61 optional
<boolean
> supportsConditionalBreakpoints
;
62 // The debug adapter supports the `configurationDone` request.
63 optional
<boolean
> supportsConfigurationDoneRequest
;
64 // The debug adapter supports data breakpoints.
65 optional
<boolean
> supportsDataBreakpoints
;
66 // The debug adapter supports the delayed loading of parts of the stack,
67 // which requires that both the `startFrame` and `levels` arguments and the
68 // `totalFrames` result of the `stackTrace` request are supported.
69 optional
<boolean
> supportsDelayedStackTraceLoading
;
70 // The debug adapter supports the `disassemble` request.
71 optional
<boolean
> supportsDisassembleRequest
;
72 // The debug adapter supports a (side effect free) `evaluate` request for
74 optional
<boolean
> supportsEvaluateForHovers
;
75 // The debug adapter supports `filterOptions` as an argument on the
76 // `setExceptionBreakpoints` request.
77 optional
<boolean
> supportsExceptionFilterOptions
;
78 // The debug adapter supports the `exceptionInfo` request.
79 optional
<boolean
> supportsExceptionInfoRequest
;
80 // The debug adapter supports `exceptionOptions` on the
81 // `setExceptionBreakpoints` request.
82 optional
<boolean
> supportsExceptionOptions
;
83 // The debug adapter supports function breakpoints.
84 optional
<boolean
> supportsFunctionBreakpoints
;
85 // The debug adapter supports the `gotoTargets` request.
86 optional
<boolean
> supportsGotoTargetsRequest
;
87 // The debug adapter supports breakpoints that break execution after a
88 // specified number of hits.
89 optional
<boolean
> supportsHitConditionalBreakpoints
;
90 // The debug adapter supports adding breakpoints based on instruction
92 optional
<boolean
> supportsInstructionBreakpoints
;
93 // The debug adapter supports the `loadedSources` request.
94 optional
<boolean
> supportsLoadedSourcesRequest
;
95 // The debug adapter supports log points by interpreting the `logMessage`
96 // attribute of the `SourceBreakpoint`.
97 optional
<boolean
> supportsLogPoints
;
98 // The debug adapter supports the `modules` request.
99 optional
<boolean
> supportsModulesRequest
;
100 // The debug adapter supports the `readMemory` request.
101 optional
<boolean
> supportsReadMemoryRequest
;
102 // The debug adapter supports restarting a frame.
103 optional
<boolean
> supportsRestartFrame
;
104 // The debug adapter supports the `restart` request. In this case a client
105 // should not implement `restart` by terminating and relaunching the adapter
106 // but by calling the `restart` request.
107 optional
<boolean
> supportsRestartRequest
;
108 // The debug adapter supports the `setExpression` request.
109 optional
<boolean
> supportsSetExpression
;
110 // The debug adapter supports setting a variable to a value.
111 optional
<boolean
> supportsSetVariable
;
112 // The debug adapter supports the `singleThread` property on the execution
113 // requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`,
115 optional
<boolean
> supportsSingleThreadExecutionRequests
;
116 // The debug adapter supports stepping back via the `stepBack` and
117 // `reverseContinue` requests.
118 optional
<boolean
> supportsStepBack
;
119 // The debug adapter supports the `stepInTargets` request.
120 optional
<boolean
> supportsStepInTargetsRequest
;
121 // The debug adapter supports stepping granularities (argument `granularity`)
122 // for the stepping requests.
123 optional
<boolean
> supportsSteppingGranularity
;
124 // The debug adapter supports the `terminate` request.
125 optional
<boolean
> supportsTerminateRequest
;
126 // The debug adapter supports the `terminateThreads` request.
127 optional
<boolean
> supportsTerminateThreadsRequest
;
128 // The debug adapter supports a `format` attribute on the `stackTrace`,
129 // `variables`, and `evaluate` requests.
130 optional
<boolean
> supportsValueFormattingOptions
;
131 // The debug adapter supports the `writeMemory` request.
132 optional
<boolean
> supportsWriteMemoryRequest
;
133 // The CMake version.
134 CMakeVersion cmakeVersion
;
137 DAP_DECLARE_STRUCT_TYPEINFO(CMakeInitializeResponse
);
139 // The `initialize` request is sent as the first request from the client to the
140 // debug adapter in order to configure it with client capabilities and to
141 // retrieve capabilities from the debug adapter. Until the debug adapter has
142 // responded with an `initialize` response, the client must not send any
143 // additional requests or events to the debug adapter. In addition the debug
144 // adapter is not allowed to send any requests or events to the client until it
145 // has responded with an `initialize` response. The `initialize` request may
146 // only be sent once.
147 struct CMakeInitializeRequest
: public Request
149 using Response
= CMakeInitializeResponse
;
150 // The ID of the debug adapter.
152 // The ID of the client using this adapter.
153 optional
<string
> clientID
;
154 // The human-readable name of the client using this adapter.
155 optional
<string
> clientName
;
156 // If true all column numbers are 1-based (default).
157 optional
<boolean
> columnsStartAt1
;
158 // If true all line numbers are 1-based (default).
159 optional
<boolean
> linesStartAt1
;
160 // The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH.
161 optional
<string
> locale
;
162 // Determines in what format paths are specified. The default is `path`,
163 // which is the native format.
165 // May be one of the following enumeration values:
167 optional
<string
> pathFormat
;
168 // Client supports the `argsCanBeInterpretedByShell` attribute on the
169 // `runInTerminal` request.
170 optional
<boolean
> supportsArgsCanBeInterpretedByShell
;
171 // Client supports the `invalidated` event.
172 optional
<boolean
> supportsInvalidatedEvent
;
173 // Client supports the `memory` event.
174 optional
<boolean
> supportsMemoryEvent
;
175 // Client supports memory references.
176 optional
<boolean
> supportsMemoryReferences
;
177 // Client supports progress reporting.
178 optional
<boolean
> supportsProgressReporting
;
179 // Client supports the `runInTerminal` request.
180 optional
<boolean
> supportsRunInTerminalRequest
;
181 // Client supports the `startDebugging` request.
182 optional
<boolean
> supportsStartDebuggingRequest
;
183 // Client supports the paging of variables.
184 optional
<boolean
> supportsVariablePaging
;
185 // Client supports the `type` attribute for variables.
186 optional
<boolean
> supportsVariableType
;
189 DAP_DECLARE_STRUCT_TYPEINFO(CMakeInitializeRequest
);