Documentation
¶
Overview ¶
Package dap implements the Debug Adapter Protocol independently of the UI and of the transport used to reach the adapter.
Index ¶
- Constants
- Variables
- func Call[A, R any](ctx context.Context, c *Conn, command string, args A) (R, error)
- type Breakpoint
- type Capabilities
- type Conn
- type EvaluateResponse
- type ExceptionFilter
- type Handler
- type Message
- type RunInTerminalArguments
- type Scope
- type Source
- type SourceBreakpoint
- type StackFrame
- type StoppedEvent
- type Thread
- type Variable
Constants ¶
const MaxMessage = 32 << 20
Variables ¶
var ErrClosed = errors.New("dap: connection closed")
Functions ¶
Types ¶
type Breakpoint ¶
type Capabilities ¶
type Capabilities struct {
ExceptionBreakpointFilters []ExceptionFilter `json:"exceptionBreakpointFilters"`
ConfigurationDone bool `json:"supportsConfigurationDoneRequest"`
ConditionalBreakpoints bool `json:"supportsConditionalBreakpoints"`
HitConditionalBreakpoints bool `json:"supportsHitConditionalBreakpoints"`
LogPoints bool `json:"supportsLogPoints"`
Terminate bool `json:"supportsTerminateRequest"`
VariablePaging bool `json:"supportsVariablePaging"`
}
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func New ¶
func New(stream io.ReadWriteCloser, event func(string, json.RawMessage), handler Handler) *Conn
New owns stream. Event callbacks must return promptly; requests may be made from a callback because responses are routed by the independent reader.
func (*Conn) Call ¶
Call preserves adapter-specific arguments and results without a closed command enumeration. Cancellation removes the pending request immediately.
func (*Conn) EventsDone ¶
func (c *Conn) EventsDone() <-chan struct{}
EventsDone closes after queued adapter events have been delivered, including terminal events immediately preceding EOF.
type EvaluateResponse ¶
type ExceptionFilter ¶
type Message ¶
type Message struct {
Type string `json:"type"`
Command string `json:"command,omitempty"`
Message string `json:"message,omitempty"`
Event string `json:"event,omitempty"`
Arguments json.RawMessage `json:"arguments,omitempty"`
Body json.RawMessage `json:"body,omitempty"`
Seq int `json:"seq"`
RequestSeq int `json:"request_seq,omitempty"`
Success bool `json:"success"`
}