MCPcopy Create free account
hub / github.com/microsoft/debugpy / initialize_request

Method initialize_request

src/debugpy/adapter/clients.py:148–200  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

146
147 @message_handler
148 def initialize_request(self, request):
149 if self._initialize_request is not None:
150 raise request.isnt_valid("Session is already initialized")
151
152 self.client_id = request("clientID", "")
153 self.capabilities = self.Capabilities(self, request)
154 self.expectations = self.Expectations(self, request)
155 self._initialize_request = request
156
157 exception_breakpoint_filters = [
158 {
159 "filter": "raised",
160 "label": "Raised Exceptions",
161 "default": False,
162 "description": "Break whenever any exception is raised.",
163 },
164 {
165 "filter": "uncaught",
166 "label": "Uncaught Exceptions",
167 "default": True,
168 "description": "Break when the process is exiting due to unhandled exception.",
169 },
170 {
171 "filter": "userUnhandled",
172 "label": "User Uncaught Exceptions",
173 "default": False,
174 "description": "Break when exception escapes into library code.",
175 },
176 ]
177
178 return {
179 "supportsCompletionsRequest": True,
180 "supportsConditionalBreakpoints": True,
181 "supportsConfigurationDoneRequest": True,
182 "supportsDebuggerProperties": True,
183 "supportsDelayedStackTraceLoading": True,
184 "supportsEvaluateForHovers": True,
185 "supportsExceptionInfoRequest": True,
186 "supportsExceptionOptions": True,
187 "supportsFunctionBreakpoints": True,
188 "supportsHitConditionalBreakpoints": True,
189 "supportsLogPoints": True,
190 "supportsModulesRequest": True,
191 "supportsSetExpression": True,
192 "supportsSetVariable": True,
193 "supportsValueFormattingOptions": True,
194 "supportsTerminateDebuggee": True,
195 "supportsTerminateRequest": True,
196 "supportsGotoTargetsRequest": True,
197 "supportsClipboardContext": True,
198 "exceptionBreakpointFilters": exception_breakpoint_filters,
199 "supportsStepInTargetsRequest": True,
200 }
201
202 # Common code for "launch" and "attach" request handlers.
203 #

Callers

nothing calls this directly

Calls 1

isnt_validMethod · 0.80

Tested by

no test coverage detected