Categorygithub.com/google/go-dap
modulepackage
0.12.0
Repository: https://github.com/google/go-dap.git
Documentation: pkg.go.dev

# README

go-dap: Go implementation of the Debug Adapter Protocol

PkgGoDev Build Status Go Report Card

For an overview of DAP, see https://microsoft.github.io/debug-adapter-protocol/overview

Contributing

We'd love to accept your patches and contributions to this project. See docs/contributing for more details.

License

This project is licensed under the Apache License 2.0

This is not an officially supported Google product.

# Packages

No description provided by the author

# Functions

DecodeProtocolMessage parses the JSON-encoded ProtocolMessage and returns the message embedded in it.
NewCodec constructs a new codec that extends the vanilla DAP protocol.
ReadBaseMessage reads one message from r consisting of a Content-Length header and a content part.
ReadProtocolMessage reads a message from r, decodes and returns it.
WriteBaseMessage formats content with Content-Length header and delimiters as per the base protocol and writes the resulting message to w.
WriteProtocolMessage encodes message and writes it to w.

# Variables

ErrHeaderContentTooLong is returned when the content length specified in the header is above contentMaxLength.
ErrHeaderDelimiterNotCrLfCrLf is returned when only partial header delimiter \r\n\r\n is encountered.
ErrHeaderNotContentLength is returned when the parsed header is not of valid Content-Length format.

# Structs

AttachRequest: The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.
AttachResponse: Response to `attach` request.
BaseProtocolError represents base protocol error, which occurs when the raw message does not conform to the header+content format of the base protocol.
Breakpoint: Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.
BreakpointEvent: The event indicates that some information about a breakpoint has changed.
No description provided by the author
BreakpointLocation: Properties of a breakpoint location returned from the `breakpointLocations` request.
BreakpointLocationsArguments: Arguments for `breakpointLocations` request.
BreakpointLocationsRequest: The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.
BreakpointLocationsResponse: Response to `breakpointLocations` request.
No description provided by the author
CancelArguments: Arguments for `cancel` request.
CancelRequest: The `cancel` request is used by the client in two situations: - to indicate that it is no longer interested in the result produced by a specific request issued earlier - to cancel a progress sequence.
CancelResponse: Response to `cancel` request.
Capabilities: Information about the capabilities of a debug adapter.
CapabilitiesEvent: The event indicates that one or more capabilities have changed.
No description provided by the author
Checksum: The checksum of an item calculated by the specified algorithm.
Codec is responsible for turning byte blobs into DAP messages.
ColumnDescriptor: A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it, and what the column's label should be.
CompletionItem: `CompletionItems` are the suggestions returned from the `completions` request.
CompletionsArguments: Arguments for `completions` request.
CompletionsRequest: Returns a list of possible completions for a given caret position and text.
CompletionsResponse: Response to `completions` request.
No description provided by the author
ConfigurationDoneArguments: Arguments for `configurationDone` request.
ConfigurationDoneRequest: This request indicates that the client has finished initialization of the debug adapter.
ConfigurationDoneResponse: Response to `configurationDone` request.
ContinueArguments: Arguments for `continue` request.
ContinuedEvent: The event indicates that the execution of the debuggee has continued.
No description provided by the author
ContinueRequest: The request resumes execution of all threads.
ContinueResponse: Response to `continue` request.
No description provided by the author
DataBreakpoint: Properties of a data breakpoint passed to the `setDataBreakpoints` request.
DataBreakpointInfoArguments: Arguments for `dataBreakpointInfo` request.
DataBreakpointInfoRequest: Obtains information on a possible data breakpoint that could be set on an expression or variable.
DataBreakpointInfoResponse: Response to `dataBreakpointInfo` request.
No description provided by the author
DecodeProtocolMessageFieldError describes which JSON attribute has an unsupported value that the decoding cannot handle.
DisassembleArguments: Arguments for `disassemble` request.
DisassembledInstruction: Represents a single disassembled instruction.
DisassembleRequest: Disassembles code stored at the provided location.
DisassembleResponse: Response to `disassemble` request.
No description provided by the author
DisconnectArguments: Arguments for `disconnect` request.
DisconnectRequest: The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).
DisconnectResponse: Response to `disconnect` request.
ErrorMessage: A structured message object.
ErrorResponse: On error (whenever `success` is false), the body can provide more details.
No description provided by the author
EvaluateArguments: Arguments for `evaluate` request.
EvaluateRequest: Evaluates the given expression in the context of the topmost stack frame.
EvaluateResponse: Response to `evaluate` request.
No description provided by the author
Event: A debug adapter initiated event.
ExceptionBreakpointsFilter: An `ExceptionBreakpointsFilter` is 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 `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.
ExceptionInfoArguments: Arguments for `exceptionInfo` request.
ExceptionInfoRequest: Retrieves the details of the exception that caused this event to be raised.
ExceptionInfoResponse: Response to `exceptionInfo` request.
No description provided by the author
ExceptionOptions: An `ExceptionOptions` assigns configuration options to a set of exceptions.
ExceptionPathSegment: An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.
ExitedEvent: The event indicates that the debuggee has exited and returns its exit code.
No description provided by the author
FunctionBreakpoint: Properties of a breakpoint passed to the `setFunctionBreakpoints` request.
GotoArguments: Arguments for `goto` request.
GotoRequest: The request sets the location where the debuggee will continue to run.
GotoResponse: Response to `goto` request.
GotoTarget: A `GotoTarget` describes a code location that can be used as a target in the `goto` request.
GotoTargetsArguments: Arguments for `gotoTargets` request.
GotoTargetsRequest: This request retrieves the possible goto targets for the specified source location.
GotoTargetsResponse: Response to `gotoTargets` request.
No description provided by the author
InitializedEvent: This event indicates that the debug adapter is ready to accept configuration requests (e.g.
InitializeRequest: The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.
InitializeRequestArguments: Arguments for `initialize` request.
InitializeResponse: Response to `initialize` request.
InstructionBreakpoint: Properties of a breakpoint passed to the `setInstructionBreakpoints` request.
InvalidatedEvent: This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.
No description provided by the author
LaunchRequest: This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).
LaunchResponse: Response to `launch` request.
LoadedSourceEvent: The event indicates that some source has been added, changed, or removed from the set of all loaded sources.
No description provided by the author
LoadedSourcesArguments: Arguments for `loadedSources` request.
LoadedSourcesRequest: Retrieves the set of all sources currently loaded by the debugged process.
LoadedSourcesResponse: Response to `loadedSources` request.
No description provided by the author
MemoryEvent: This event indicates that some memory range has been updated.
No description provided by the author
Module: A Module object represents a row in the modules view.
ModuleEvent: The event indicates that some information about a module has changed.
No description provided by the author
ModulesArguments: Arguments for `modules` request.
ModulesRequest: Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.
ModulesResponse: Response to `modules` request.
No description provided by the author
ModulesViewDescriptor: The ModulesViewDescriptor is the container for all declarative configuration options of a module view.
NextArguments: Arguments for `next` request.
NextRequest: The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.
NextResponse: Response to `next` request.
OutputEvent: The event indicates that the target has produced some output.
No description provided by the author
PauseArguments: Arguments for `pause` request.
PauseRequest: The request suspends the debuggee.
PauseResponse: Response to `pause` request.
ProcessEvent: The event indicates that the debugger has begun debugging a new process.
No description provided by the author
ProgressEndEvent: The event signals the end of the progress reporting with a final message.
No description provided by the author
ProgressStartEvent: The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.
No description provided by the author
ProgressUpdateEvent: The event signals that the progress reporting needs to be updated with a new message and/or percentage.
No description provided by the author
ProtocolMessage: Base class of requests, responses, and events.
ReadMemoryArguments: Arguments for `readMemory` request.
ReadMemoryRequest: Reads bytes from memory at the provided location.
ReadMemoryResponse: Response to `readMemory` request.
No description provided by the author
Request: A client or debug adapter initiated request.
Response: Response for a request.
RestartFrameArguments: Arguments for `restartFrame` request.
RestartFrameRequest: The request restarts execution of the specified stack frame.
RestartFrameResponse: Response to `restartFrame` request.
RestartRequest: Restarts a debug session.
RestartResponse: Response to `restart` request.
ReverseContinueArguments: Arguments for `reverseContinue` request.
ReverseContinueRequest: The request resumes backward execution of all threads.
ReverseContinueResponse: Response to `reverseContinue` request.
RunInTerminalRequest: This request is sent from the debug adapter to the client to run a command in a terminal.
RunInTerminalRequestArguments: Arguments for `runInTerminal` request.
RunInTerminalResponse: Response to `runInTerminal` request.
No description provided by the author
Scope: A `Scope` is a named container for variables.
ScopesArguments: Arguments for `scopes` request.
ScopesRequest: The request returns the variable scopes for a given stack frame ID.
ScopesResponse: Response to `scopes` request.
No description provided by the author
SetBreakpointsArguments: Arguments for `setBreakpoints` request.
SetBreakpointsRequest: Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.
SetBreakpointsResponse: Response to `setBreakpoints` request.
No description provided by the author
SetDataBreakpointsArguments: Arguments for `setDataBreakpoints` request.
SetDataBreakpointsRequest: Replaces all existing data breakpoints with new data breakpoints.
SetDataBreakpointsResponse: Response to `setDataBreakpoints` request.
No description provided by the author
SetExceptionBreakpointsArguments: Arguments for `setExceptionBreakpoints` request.
SetExceptionBreakpointsRequest: The request configures the debugger's response to thrown exceptions.
SetExceptionBreakpointsResponse: Response to `setExceptionBreakpoints` request.
No description provided by the author
SetExpressionArguments: Arguments for `setExpression` request.
SetExpressionRequest: Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.
SetExpressionResponse: Response to `setExpression` request.
No description provided by the author
SetFunctionBreakpointsArguments: Arguments for `setFunctionBreakpoints` request.
SetFunctionBreakpointsRequest: Replaces all existing function breakpoints with new function breakpoints.
SetFunctionBreakpointsResponse: Response to `setFunctionBreakpoints` request.
No description provided by the author
SetInstructionBreakpointsArguments: Arguments for `setInstructionBreakpoints` request.
SetInstructionBreakpointsRequest: Replaces all existing instruction breakpoints.
SetInstructionBreakpointsResponse: Response to `setInstructionBreakpoints` request.
No description provided by the author
SetVariableArguments: Arguments for `setVariable` request.
SetVariableRequest: Set the variable with the given name in the variable container to a new value.
SetVariableResponse: Response to `setVariable` request.
No description provided by the author
Source: A `Source` is a descriptor for source code.
SourceArguments: Arguments for `source` request.
SourceBreakpoint: Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.
SourceRequest: The request retrieves the source code for a given source reference.
SourceResponse: Response to `source` request.
No description provided by the author
StackFrame: A Stackframe contains the source location.
StackFrameFormat: Provides formatting information for a stack frame.
StackTraceArguments: Arguments for `stackTrace` request.
StackTraceRequest: The request returns a stacktrace from the current execution state of a given thread.
StackTraceResponse: Response to `stackTrace` request.
No description provided by the author
StartDebuggingRequest: This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.
StartDebuggingRequestArguments: Arguments for `startDebugging` request.
StartDebuggingResponse: Response to `startDebugging` request.
StepBackArguments: Arguments for `stepBack` request.
StepBackRequest: The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.
StepBackResponse: Response to `stepBack` request.
StepInArguments: Arguments for `stepIn` request.
StepInRequest: The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.
StepInResponse: Response to `stepIn` request.
StepInTarget: A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.
StepInTargetsArguments: Arguments for `stepInTargets` request.
StepInTargetsRequest: This request retrieves the possible step-in targets for the specified stack frame.
StepInTargetsResponse: Response to `stepInTargets` request.
No description provided by the author
StepOutArguments: Arguments for `stepOut` request.
StepOutRequest: The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.
StepOutResponse: Response to `stepOut` request.
StoppedEvent: The event indicates that the execution of the debuggee has stopped due to some condition.
No description provided by the author
TerminateArguments: Arguments for `terminate` request.
TerminatedEvent: The event indicates that debugging of the debuggee has terminated.
No description provided by the author
TerminateRequest: The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully.
TerminateResponse: Response to `terminate` request.
TerminateThreadsArguments: Arguments for `terminateThreads` request.
TerminateThreadsRequest: The request terminates the threads with the given ids.
TerminateThreadsResponse: Response to `terminateThreads` request.
Thread: A Thread.
ThreadEvent: The event indicates that a thread has started or exited.
No description provided by the author
ThreadsRequest: The request retrieves a list of all threads.
ThreadsResponse: Response to `threads` request.
No description provided by the author
ValueFormat: Provides formatting information for a value.
Variable: A Variable is a name/value pair.
VariablePresentationHint: Properties of a variable that can be used to determine how to render the variable in the UI.
VariablesArguments: Arguments for `variables` request.
VariablesRequest: Retrieves all child variables for the given variable reference.
VariablesResponse: Response to `variables` request.
No description provided by the author
WriteMemoryArguments: Arguments for `writeMemory` request.
WriteMemoryRequest: Writes bytes to memory at the provided location.
WriteMemoryResponse: Response to `writeMemory` request.
No description provided by the author

# Interfaces

EventMessage is an interface implemented by all Event-types.
LaunchAttachRequest is an interface implemented by LaunchRequest and AttachRequest as they contain shared implementation specific arguments that are not part of the specification.
Message is an interface that all DAP message types implement with pointer receivers.
RequestMessage is an interface implemented by all Request-types.
ResponseMessage is an interface implemented by all Response-types.

# Type aliases

ChecksumAlgorithm: Names of checksum algorithms that may be supported by a debug adapter.
CompletionItemType: Some predefined types for the CompletionItem.
DataBreakpointAccessType: This enumeration defines all possible access types for data breakpoints.
ExceptionBreakMode: This enumeration defines all possible conditions when a thrown exception should result in a break.
InvalidatedAreas: Logical areas that can be invalidated by the `invalidated` event.
SteppingGranularity: The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.