dap_adapters library
Support for Debug Adapter Protocol (DAP) adapters.
Classes
- AttachRequestArguments
-
Arguments for
attachrequest. Additional attributes are implementation specific. - AttachResponse
-
Response to
attachrequest. This is just an acknowledgement, so no body field is required. - AttachResponseBody
- Contains request result if success is true and error details if success is false.
- Breakpoint
-
Information about a breakpoint created in
setBreakpoints,setFunctionBreakpoints,setInstructionBreakpoints, orsetDataBreakpointsrequests. - BreakpointEventBody
- BreakpointLocation
-
Properties of a breakpoint location returned from the
breakpointLocationsrequest. - BreakpointLocationsArguments
-
Arguments for
breakpointLocationsrequest. - BreakpointLocationsResponse
-
Response to
breakpointLocationsrequest. Contains possible locations for source breakpoints. - BreakpointLocationsResponseBody
- BreakpointMode
-
A
BreakpointModeis provided as a option when setting breakpoints on sources or instructions. - ByteStreamServerChannel
- A wrapper over a Stream/StreamSink that encodes/decores DAP/LSP request/response/event messages.
- ByteToLineTransformer
- Transforms a stream of bytes into strings whenever a newline is encountered.
- CancelArguments
-
Arguments for
cancelrequest. - CancelResponse
-
Response to
cancelrequest. This is just an acknowledgement, so no body field is required. - CancelResponseBody
- Contains request result if success is true and error details if success is false.
- Capabilities
- Information about the capabilities of a debug adapter.
- CapabilitiesEventBody
- Checksum
- The checksum of an item calculated by the specified algorithm.
- ColumnDescriptor
-
A
ColumnDescriptorspecifies what module attribute to show in a column of the modules view, how to format it, and what the column's label should be. It is only used if the underlying UI actually supports this level of customization. - Command
- CompletionItem
-
CompletionItemsare the suggestions returned from thecompletionsrequest. - CompletionsArguments
-
Arguments for
completionsrequest. - CompletionsResponse
-
Response to
completionsrequest. - CompletionsResponseBody
- ConfigurationDoneArguments
-
Arguments for
configurationDonerequest. - ConfigurationDoneResponse
-
Response to
configurationDonerequest. This is just an acknowledgement, so no body field is required. - ConfigurationDoneResponseBody
- Contains request result if success is true and error details if success is false.
- ContinueArguments
-
Arguments for
continuerequest. - ContinuedEventBody
- ContinueResponse
-
Response to
continuerequest. - ContinueResponseBody
- DapProgressReporter
- A reporter that can send progress notifications to the client.
- DapServer
- A DAP server that communicates over a ByteStreamServerChannel, usually constructed from the processes stdin/stdout streams.
- DartAttachRequestArguments
- An implementation of AttachRequestArguments that includes all fields used by the Dart CLI and test debug adapters.
- DartCommonLaunchAttachRequestArguments
- A common base for DartLaunchRequestArguments and DartAttachRequestArguments for fields that are common to both.
-
DartDebugAdapter<
TL extends LaunchRequestArguments, TA extends AttachRequestArguments> - A base DAP Debug Adapter implementation for running and debugging Dart-based applications (including Flutter and Tests).
- DartInitializeRequestArguments
- A custom version of InitializeRequestArguments that adds custom Dart capabilities not covered by the DAP spec.
- DartLaunchRequestArguments
- An implementation of LaunchRequestArguments that includes all fields used by the Dart CLI and test debug adapters.
- DataBreakpoint
-
Properties of a data breakpoint passed to the
setDataBreakpointsrequest. - DataBreakpointInfoArguments
-
Arguments for
dataBreakpointInforequest. - DataBreakpointInfoResponse
-
Response to
dataBreakpointInforequest. - DataBreakpointInfoResponseBody
- DdsHostedAdapter
- A DAP Debug Adapter for attaching to already-running Dart and Flutter applications.
- DebugAdapterArgumentReader
- A helper for reading arguments for DAP requests from the client.
- DisassembleArguments
-
Arguments for
disassemblerequest. - DisassembledInstruction
- Represents a single disassembled instruction.
- DisassembleResponse
-
Response to
disassemblerequest. - DisassembleResponseBody
- DisconnectArguments
-
Arguments for
disconnectrequest. - DisconnectResponse
-
Response to
disconnectrequest. This is just an acknowledgement, so no body field is required. - DisconnectResponseBody
- Contains request result if success is true and error details if success is false.
-
Either2<
T1, T2> -
Represents either a
T1orT2. - ErrorMessageType
- ErrorResponse
-
On error (whenever
successis false), the body can provide more details. - ErrorResponseBody
- EvaluateArguments
-
Arguments for
evaluaterequest. - EvaluateResponse
-
Response to
evaluaterequest. - EvaluateResponseBody
- Event
- A debug adapter initiated event.
- EventBody
-
A base class for (spec-generated) classes that represent the
bodyof a an event. - ExceptionBreakpointsFilter
-
An
ExceptionBreakpointsFilteris shown in the UI as an filter option for configuring how exceptions are dealt with. - ExceptionDetails
- Detailed information about an exception that has occurred.
- ExceptionFilterOptions
-
An
ExceptionFilterOptionsis used to specify an exception filter together with a condition for thesetExceptionBreakpointsrequest. - ExceptionInfoArguments
-
Arguments for
exceptionInforequest. - ExceptionInfoResponse
-
Response to
exceptionInforequest. - ExceptionInfoResponseBody
- ExceptionOptions
-
An
ExceptionOptionsassigns configuration options to a set of exceptions. - ExceptionPathSegment
-
An
ExceptionPathSegmentrepresents a segment in a path that is used to match leafs or nodes in a tree of exceptions. If a segment consists of more than one name, it matches the names provided ifnegateis false or missing, or it matches anything except the names provided ifnegateis true. - ExitedEventBody
- FunctionBreakpoint
-
Properties of a breakpoint passed to the
setFunctionBreakpointsrequest. - GotoArguments
-
Arguments for
gotorequest. - GotoResponse
-
Response to
gotorequest. This is just an acknowledgement, so no body field is required. - GotoResponseBody
- Contains request result if success is true and error details if success is false.
- GotoTarget
-
A
GotoTargetdescribes a code location that can be used as a target in thegotorequest. The possible goto targets can be determined via thegotoTargetsrequest. - GotoTargetsArguments
-
Arguments for
gotoTargetsrequest. - GotoTargetsResponse
-
Response to
gotoTargetsrequest. - GotoTargetsResponseBody
- InitializedEventBody
- Event-specific information.
- InitializeRequestArguments
-
Arguments for
initializerequest. - InitializeResponse
-
Response to
initializerequest. - InitializeResponseBody
- The capabilities of this debug adapter.
- InstructionBreakpoint
-
Properties of a breakpoint passed to the
setInstructionBreakpointsrequest - InvalidatedEventBody
- LaunchRequestArguments
-
Arguments for
launchrequest. Additional attributes are implementation specific. - LaunchResponse
-
Response to
launchrequest. This is just an acknowledgement, so no body field is required. - LaunchResponseBody
- Contains request result if success is true and error details if success is false.
- LoadedSourceEventBody
- LoadedSourcesArguments
-
Arguments for
loadedSourcesrequest. - LoadedSourcesResponse
-
Response to
loadedSourcesrequest. - LoadedSourcesResponseBody
- LocationsArguments
-
Arguments for
locationsrequest. - LocationsResponse
-
Response to
locationsrequest. - LocationsResponseBody
- MemoryEventBody
- Message
- A structured message object. Used to return errors from requests.
- Module
-
A Module object represents a row in the modules view.
The
idattribute identifies a module in the modules view and is used in amoduleevent for identifying a module for adding, updating or deleting. Thenameattribute is used to minimally render the module in the UI. - ModuleEventBody
- ModulesArguments
-
Arguments for
modulesrequest. - ModulesResponse
-
Response to
modulesrequest. - ModulesResponseBody
- NextArguments
-
Arguments for
nextrequest. - NextResponse
-
Response to
nextrequest. This is just an acknowledgement, so no body field is required. - NextResponseBody
- Contains request result if success is true and error details if success is false.
- OutputEventBody
- Parameters
- PauseArguments
-
Arguments for
pauserequest. - PauseResponse
-
Response to
pauserequest. This is just an acknowledgement, so no body field is required. - PauseResponseBody
- Contains request result if success is true and error details if success is false.
- ProcessEventBody
- ProgressEndEventBody
- ProgressStartEventBody
- ProgressUpdateEventBody
- ProtocolMessage
- Base class of requests, responses, and events.
- RawEventBody
- A generic event body class that just supplies an object directly.
- RawRequestArguments
- A generic arguments class that just supplies the arguments map directly.
- ReadMemoryArguments
-
Arguments for
readMemoryrequest. - ReadMemoryResponse
-
Response to
readMemoryrequest. - ReadMemoryResponseBody
- Request
- A client or debug adapter initiated request.
- RequestArguments
-
A base class for (spec-generated) classes that represent the
argumentsof a request. - Response
- Response for a request.
- RestartArguments
-
Arguments for
restartrequest. - RestartFrameArguments
-
Arguments for
restartFramerequest. - RestartFrameResponse
-
Response to
restartFramerequest. This is just an acknowledgement, so no body field is required. - RestartFrameResponseBody
- Contains request result if success is true and error details if success is false.
- RestartResponse
-
Response to
restartrequest. This is just an acknowledgement, so no body field is required. - RestartResponseBody
- Contains request result if success is true and error details if success is false.
- ReverseContinueArguments
-
Arguments for
reverseContinuerequest. - ReverseContinueResponse
-
Response to
reverseContinuerequest. This is just an acknowledgement, so no body field is required. - ReverseContinueResponseBody
- Contains request result if success is true and error details if success is false.
- RunInTerminalRequestArguments
-
Arguments for
runInTerminalrequest. - RunInTerminalResponse
-
Response to
runInTerminalrequest. - RunInTerminalResponseBody
- Scope
-
A
Scopeis a named container for variables. Optionally a scope can map to a source or a range within a source. - ScopesArguments
-
Arguments for
scopesrequest. - ScopesResponse
-
Response to
scopesrequest. - ScopesResponseBody
- SetBreakpointsArguments
-
Arguments for
setBreakpointsrequest. - SetBreakpointsResponse
-
Response to
setBreakpointsrequest. Returned is information about each breakpoint created by this request. This includes the actual code location and whether the breakpoint could be verified. The breakpoints returned are in the same order as the elements of thebreakpoints(or the deprecatedlines) array in the arguments. - SetBreakpointsResponseBody
- SetDataBreakpointsArguments
-
Arguments for
setDataBreakpointsrequest. - SetDataBreakpointsResponse
-
Response to
setDataBreakpointsrequest. Returned is information about each breakpoint created by this request. - SetDataBreakpointsResponseBody
- SetExceptionBreakpointsArguments
-
Arguments for
setExceptionBreakpointsrequest. - SetExceptionBreakpointsResponse
-
Response to
setExceptionBreakpointsrequest. The response contains an array ofBreakpointobjects with information about each exception breakpoint or filter. TheBreakpointobjects are in the same order as the elements of thefilters,filterOptions,exceptionOptionsarrays given as arguments. If bothfiltersandfilterOptionsare given, the returned array must start withfiltersinformation first, followed byfilterOptionsinformation. Theverifiedproperty of aBreakpointobject signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error themessageproperty explains the problem. Theidproperty can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events. For backward compatibility both thebreakpointsarray and the enclosingbodyare optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters. - SetExceptionBreakpointsResponseBody
- SetExpressionArguments
-
Arguments for
setExpressionrequest. - SetExpressionResponse
-
Response to
setExpressionrequest. - SetExpressionResponseBody
- SetFunctionBreakpointsArguments
-
Arguments for
setFunctionBreakpointsrequest. - SetFunctionBreakpointsResponse
-
Response to
setFunctionBreakpointsrequest. Returned is information about each breakpoint created by this request. - SetFunctionBreakpointsResponseBody
- SetInstructionBreakpointsArguments
-
Arguments for
setInstructionBreakpointsrequest - SetInstructionBreakpointsResponse
-
Response to
setInstructionBreakpointsrequest - SetInstructionBreakpointsResponseBody
- SetVariableArguments
-
Arguments for
setVariablerequest. - SetVariableResponse
-
Response to
setVariablerequest. - SetVariableResponseBody
- Source
-
A
Sourceis a descriptor for source code. It is returned from the debug adapter as part of aStackFrameand it is used by clients when specifying breakpoints. - SourceArguments
-
Arguments for
sourcerequest. - SourceBreakpoint
-
Properties of a breakpoint or logpoint passed to the
setBreakpointsrequest. - SourceResponse
-
Response to
sourcerequest. - SourceResponseBody
- StackFrame
- A Stackframe contains the source location.
- StackFrameFormat
- Provides formatting information for a stack frame.
- StackTraceArguments
-
Arguments for
stackTracerequest. - StackTraceResponse
-
Response to
stackTracerequest. - StackTraceResponseBody
- StartDebuggingRequestArguments
-
Arguments for
startDebuggingrequest. - StartDebuggingResponse
-
Response to
startDebuggingrequest. This is just an acknowledgement, so no body field is required. - StartDebuggingResponseBody
- Contains request result if success is true and error details if success is false.
- StepBackArguments
-
Arguments for
stepBackrequest. - StepBackResponse
-
Response to
stepBackrequest. This is just an acknowledgement, so no body field is required. - StepBackResponseBody
- Contains request result if success is true and error details if success is false.
- StepInArguments
-
Arguments for
stepInrequest. - StepInResponse
-
Response to
stepInrequest. This is just an acknowledgement, so no body field is required. - StepInResponseBody
- Contains request result if success is true and error details if success is false.
- StepInTarget
-
A
StepInTargetcan be used in thestepInrequest and determines into which single target thestepInrequest should step. - StepInTargetsArguments
-
Arguments for
stepInTargetsrequest. - StepInTargetsResponse
-
Response to
stepInTargetsrequest. - StepInTargetsResponseBody
- StepOutArguments
-
Arguments for
stepOutrequest. - StepOutResponse
-
Response to
stepOutrequest. This is just an acknowledgement, so no body field is required. - StepOutResponseBody
- Contains request result if success is true and error details if success is false.
- StoppedEventBody
- TerminateArguments
-
Arguments for
terminaterequest. - TerminatedEventBody
- TerminateResponse
-
Response to
terminaterequest. This is just an acknowledgement, so no body field is required. - TerminateResponseBody
- Contains request result if success is true and error details if success is false.
- TerminateThreadsArguments
-
Arguments for
terminateThreadsrequest. - TerminateThreadsResponse
-
Response to
terminateThreadsrequest. This is just an acknowledgement, no body field is required. - TerminateThreadsResponseBody
- Contains request result if success is true and error details if success is false.
- Thread
- A Thread
- ThreadEventBody
- ThreadsResponse
-
Response to
threadsrequest. - ThreadsResponseBody
- ThreadWithIsolateId
- Extends Thread with isolateId for easier mapping for clients using both DAP and VM Service.
- ToJsonable
- An object from the LSP/DAP specs that can be converted to JSON.
- ValueFormat
- Provides formatting information for a value.
- Variable
-
A Variable is a name/value pair.
The
typeattribute is shown if space permits or when hovering over the variable's name. Thekindattribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private. If the value is structured (has children), a handle is provided to retrieve the children with thevariablesrequest. If the number of named or indexed children is large, the numbers should be returned via thenamedVariablesandindexedVariablesattributes. The client can use this information to present the children in a paged UI and fetch them in chunks. - VariablePresentationHint
- Properties of a variable that can be used to determine how to render the variable in the UI.
- VariablesArguments
-
Arguments for
variablesrequest. - VariablesResponse
-
Response to
variablesrequest. - VariablesResponseBody
- VmServiceLogger
-
Wraps a Logger as a
vm/Logto be passed to the VM Service library. - WriteMemoryArguments
-
Arguments for
writeMemoryrequest. - WriteMemoryResponse
-
Response to
writeMemoryrequest. - WriteMemoryResponseBody
Mixins
- ColorUtils
- FileUtils
- PackageConfigUtils
- A mixin providing some utility functions for locating/working with package_config.json files.
- PidTracker
- A mixin for tracking additional PIDs that can be shut down at the end of a debug session.
- TestAdapter
- A mixin providing some utility functions for adapters that run tests and provides some basic test reporting since otherwise nothing is printed when using the JSON test reporter.
- VmServiceInfoFileUtils
- A mixin providing some utility functions for working with vm-service-info files such as ensuring a temp folder exists to create them in, and waiting for the file to become valid parsable JSON.
Constants
-
commandTypes
→ const Map<
Type, String> - dartMimeType → const String
- The mime type to send with source responses to the client.
-
eventTypes
→ const Map<
Type, String> - maxToStringsPerEvaluation → const int
- Maximum number of toString()s to be called when responding to variables requests from the client.
- threadExceptionExpression → const String
- An expression that evaluates to the exception for the current thread.
Functions
-
specToJson(
Object? obj) → Object?
Typedefs
- BreakpointModeApplicability = String
-
Describes one or more type of breakpoint a
BreakpointModeapplies to. This is a non-exhaustive enumeration and may expand as future breakpoint types are added. - ChecksumAlgorithm = String
- Names of checksum algorithms that may be supported by a debug adapter.
- CompletionItemType = String
- Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.
- DataBreakpointAccessType = String
- This enumeration defines all possible access types for data breakpoints.
- ExceptionBreakMode = String
- This enumeration defines all possible conditions when a thrown exception should result in a break. never: never breaks, always: always breaks, unhandled: breaks when exception unhandled, userUnhandled: breaks if the exception is not handled by user code.
- InvalidatedAreas = String
-
Logical areas that can be invalidated by the
invalidatedevent. - Logger = void Function(String)
- SteppingGranularity = String
-
The granularity of one 'step' in the stepping requests
next,stepIn,stepOut, andstepBack. - UriConverter = String? Function(String uri)
Exceptions / Errors
- DebugAdapterException
- Exception thrown by a debug adapter when a request is not valid, either because the inputs are not correct or the adapter is not in the correct state.
- DebugAdapterInvalidArgumentException
- Exception thrown when failing to read arguments supplied by the user because they are not the correct type.