dap

package module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 26

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.

Documentation

Overview

Package dap contains data types and code for Debug Adapter Protocol (DAP) specification. https://github.com/microsoft/vscode-debugadapter-node/blob/main/debugProtocol.json

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHeaderDelimiterNotCrLfCrLf is returned when only partial header
	// delimiter \r\n\r\n is encountered.
	ErrHeaderDelimiterNotCrLfCrLf = &BaseProtocolError{fmt.Sprintf("header delimiter is not %q", crLfcrLf)}

	// ErrHeaderNotContentLength is returned when the parsed header is
	// not of valid Content-Length format.
	ErrHeaderNotContentLength = &BaseProtocolError{fmt.Sprintf("header format is not %q", contentLengthHeaderRegex)}

	// ErrHeaderContentTooLong is returned when the content length specified in
	// the header is above contentMaxLength.
	ErrHeaderContentTooLong = &BaseProtocolError{fmt.Sprintf("content length over %v bytes", contentMaxLength)}
)

Functions

func ReadBaseMessage

func ReadBaseMessage(r *bufio.Reader) ([]byte, error)

ReadBaseMessage reads one message from r consisting of a Content-Length header and a content part. It parses the header to determine the size of the content part and extracts and returns the actual content of the message. Returns nil bytes on error, which can be one of the standard IO errors or a BaseProtocolError defined in this package.

func WriteBaseMessage

func WriteBaseMessage(w io.Writer, content []byte) error

WriteBaseMessage formats content with Content-Length header and delimiters as per the base protocol and writes the resulting message to w.

func WriteProtocolMessage

func WriteProtocolMessage(w io.Writer, message Message) error

WriteProtocolMessage encodes message and writes it to w.

Types

type AttachRequest

type AttachRequest struct {
	Request

	Arguments json.RawMessage `json:"arguments"`
}

AttachRequest: The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running. Since attaching is debugger/runtime specific, the arguments for this request are not part of this specification.

func (*AttachRequest) GetArguments added in v0.4.0

func (r *AttachRequest) GetArguments() json.RawMessage

func (*AttachRequest) GetRequest added in v0.3.0

func (r *AttachRequest) GetRequest() *Request

type AttachResponse

type AttachResponse struct {
	Response
}

AttachResponse: Response to 'attach' request. This is just an acknowledgement, so no body field is required.

func (*AttachResponse) GetResponse added in v0.3.0

func (r *AttachResponse) GetResponse() *Response

type BaseProtocolError

type BaseProtocolError struct {
	Err string
}

BaseProtocolError represents base protocol error, which occurs when the raw message does not conform to the header+content format of the base protocol.

func (*BaseProtocolError) Error

func (bpe *BaseProtocolError) Error() string

type Breakpoint

type Breakpoint struct {
	Id                   int    `json:"id,omitempty"`
	Verified             bool   `json:"verified"`
	Message              string `json:"message,omitempty"`
	Source               Source `json:"source,omitempty"`
	Line                 int    `json:"line,omitempty"`
	Column               int    `json:"column,omitempty"`
	EndLine              int    `json:"endLine,omitempty"`
	EndColumn            int    `json:"endColumn,omitempty"`
	InstructionReference string `json:"instructionReference,omitempty"`
	Offset               int    `json:"offset,omitempty"`
}

Breakpoint: Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.

type BreakpointEvent

type BreakpointEvent struct {
	Event

	Body BreakpointEventBody `json:"body"`
}

BreakpointEvent: The event indicates that some information about a breakpoint has changed.

func (*BreakpointEvent) GetEvent added in v0.3.0

func (e *BreakpointEvent) GetEvent() *Event

type BreakpointEventBody

type BreakpointEventBody struct {
	Reason     string     `json:"reason"`
	Breakpoint Breakpoint `json:"breakpoint"`
}

type BreakpointLocation

type BreakpointLocation struct {
	Line      int `json:"line"`
	Column    int `json:"column,omitempty"`
	EndLine   int `json:"endLine,omitempty"`
	EndColumn int `json:"endColumn,omitempty"`
}

BreakpointLocation: Properties of a breakpoint location returned from the 'breakpointLocations' request.

type BreakpointLocationsArguments

type BreakpointLocationsArguments struct {
	Source    Source `json:"source"`
	Line      int    `json:"line"`
	Column    int    `json:"column,omitempty"`
	EndLine   int    `json:"endLine,omitempty"`
	EndColumn int    `json:"endColumn,omitempty"`
}

BreakpointLocationsArguments: Arguments for 'breakpointLocations' request.

type BreakpointLocationsRequest

type BreakpointLocationsRequest struct {
	Request

	Arguments BreakpointLocationsArguments `json:"arguments,omitempty"`
}

BreakpointLocationsRequest: The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range. Clients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.

func (*BreakpointLocationsRequest) GetRequest added in v0.3.0

func (r *BreakpointLocationsRequest) GetRequest() *Request

type BreakpointLocationsResponse

type BreakpointLocationsResponse struct {
	Response

	Body BreakpointLocationsResponseBody `json:"body"`
}

BreakpointLocationsResponse: Response to 'breakpointLocations' request. Contains possible locations for source breakpoints.

func (*BreakpointLocationsResponse) GetResponse added in v0.3.0

func (r *BreakpointLocationsResponse) GetResponse() *Response

type BreakpointLocationsResponseBody

type BreakpointLocationsResponseBody struct {
	Breakpoints []BreakpointLocation `json:"breakpoints"`
}

type CancelArguments

type CancelArguments struct {
	RequestId  int    `json:"requestId,omitempty"`
	ProgressId string `json:"progressId,omitempty"`
}

CancelArguments: Arguments for 'cancel' request.

type CancelRequest

type CancelRequest struct {
	Request

	Arguments CancelArguments `json:"arguments,omitempty"`
}

CancelRequest: The 'cancel' request is used by the frontend 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. Clients should only call this request if the capability 'supportsCancelRequest' is true. This request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees. The 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users. A frontend client should only call this request if the capability 'supportsCancelRequest' is true. The request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true) or an error response ('success' attribute false and the 'message' set to 'cancelled'). Returning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not.

The progress that got cancelled still needs to send a 'progressEnd' event back.
A client should not assume that progress just got cancelled after sending the 'cancel' request.

func (*CancelRequest) GetRequest added in v0.3.0

func (r *CancelRequest) GetRequest() *Request

type CancelResponse

type CancelResponse struct {
	Response
}

CancelResponse: Response to 'cancel' request. This is just an acknowledgement, so no body field is required.

func (*CancelResponse) GetResponse added in v0.3.0

func (r *CancelResponse) GetResponse() *Response

type Capabilities

type Capabilities struct {
	SupportsConfigurationDoneRequest   bool                         `json:"supportsConfigurationDoneRequest,omitempty"`
	SupportsFunctionBreakpoints        bool                         `json:"supportsFunctionBreakpoints,omitempty"`
	SupportsConditionalBreakpoints     bool                         `json:"supportsConditionalBreakpoints,omitempty"`
	SupportsHitConditionalBreakpoints  bool                         `json:"supportsHitConditionalBreakpoints,omitempty"`
	SupportsEvaluateForHovers          bool                         `json:"supportsEvaluateForHovers,omitempty"`
	ExceptionBreakpointFilters         []ExceptionBreakpointsFilter `json:"exceptionBreakpointFilters,omitempty"`
	SupportsStepBack                   bool                         `json:"supportsStepBack,omitempty"`
	SupportsSetVariable                bool                         `json:"supportsSetVariable,omitempty"`
	SupportsRestartFrame               bool                         `json:"supportsRestartFrame,omitempty"`
	SupportsGotoTargetsRequest         bool                         `json:"supportsGotoTargetsRequest,omitempty"`
	SupportsStepInTargetsRequest       bool                         `json:"supportsStepInTargetsRequest,omitempty"`
	SupportsCompletionsRequest         bool                         `json:"supportsCompletionsRequest,omitempty"`
	CompletionTriggerCharacters        []string                     `json:"completionTriggerCharacters,omitempty"`
	SupportsModulesRequest             bool                         `json:"supportsModulesRequest,omitempty"`
	AdditionalModuleColumns            []ColumnDescriptor           `json:"additionalModuleColumns,omitempty"`
	SupportedChecksumAlgorithms        []ChecksumAlgorithm          `json:"supportedChecksumAlgorithms,omitempty"`
	SupportsRestartRequest             bool                         `json:"supportsRestartRequest,omitempty"`
	SupportsExceptionOptions           bool                         `json:"supportsExceptionOptions,omitempty"`
	SupportsValueFormattingOptions     bool                         `json:"supportsValueFormattingOptions,omitempty"`
	SupportsExceptionInfoRequest       bool                         `json:"supportsExceptionInfoRequest,omitempty"`
	SupportTerminateDebuggee           bool                         `json:"supportTerminateDebuggee,omitempty"`
	SupportSuspendDebuggee             bool                         `json:"supportSuspendDebuggee,omitempty"`
	SupportsDelayedStackTraceLoading   bool                         `json:"supportsDelayedStackTraceLoading,omitempty"`
	SupportsLoadedSourcesRequest       bool                         `json:"supportsLoadedSourcesRequest,omitempty"`
	SupportsLogPoints                  bool                         `json:"supportsLogPoints,omitempty"`
	SupportsTerminateThreadsRequest    bool                         `json:"supportsTerminateThreadsRequest,omitempty"`
	SupportsSetExpression              bool                         `json:"supportsSetExpression,omitempty"`
	SupportsTerminateRequest           bool                         `json:"supportsTerminateRequest,omitempty"`
	SupportsDataBreakpoints            bool                         `json:"supportsDataBreakpoints,omitempty"`
	SupportsReadMemoryRequest          bool                         `json:"supportsReadMemoryRequest,omitempty"`
	SupportsWriteMemoryRequest         bool                         `json:"supportsWriteMemoryRequest,omitempty"`
	SupportsDisassembleRequest         bool                         `json:"supportsDisassembleRequest,omitempty"`
	SupportsCancelRequest              bool                         `json:"supportsCancelRequest,omitempty"`
	SupportsBreakpointLocationsRequest bool                         `json:"supportsBreakpointLocationsRequest,omitempty"`
	SupportsClipboardContext           bool                         `json:"supportsClipboardContext,omitempty"`
	SupportsSteppingGranularity        bool                         `json:"supportsSteppingGranularity,omitempty"`
	SupportsInstructionBreakpoints     bool                         `json:"supportsInstructionBreakpoints,omitempty"`
	SupportsExceptionFilterOptions     bool                         `json:"supportsExceptionFilterOptions,omitempty"`
}

Capabilities: Information about the capabilities of a debug adapter.

type CapabilitiesEvent

type CapabilitiesEvent struct {
	Event

	Body CapabilitiesEventBody `json:"body"`
}

CapabilitiesEvent: The event indicates that one or more capabilities have changed. Since the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late). Consequently this event has a hint characteristic: a frontend can only be expected to make a 'best effort' in honouring individual capabilities but there are no guarantees. Only changed capabilities need to be included, all other capabilities keep their values.

func (*CapabilitiesEvent) GetEvent added in v0.3.0

func (e *CapabilitiesEvent) GetEvent() *Event

type CapabilitiesEventBody

type CapabilitiesEventBody struct {
	Capabilities Capabilities `json:"capabilities"`
}

type Checksum

type Checksum struct {
	Algorithm ChecksumAlgorithm `json:"algorithm"`
	Checksum  string            `json:"checksum"`
}

Checksum: The checksum of an item calculated by the specified algorithm.

type ChecksumAlgorithm

type ChecksumAlgorithm string

ChecksumAlgorithm: Names of checksum algorithms that may be supported by a debug adapter.

type ColumnDescriptor

type ColumnDescriptor struct {
	AttributeName string `json:"attributeName"`
	Label         string `json:"label"`
	Format        string `json:"format,omitempty"`
	Type          string `json:"type,omitempty"`
	Width         int    `json:"width,omitempty"`
}

ColumnDescriptor: A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, 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.

type CompletionItem

type CompletionItem struct {
	Label           string             `json:"label"`
	Text            string             `json:"text,omitempty"`
	SortText        string             `json:"sortText,omitempty"`
	Type            CompletionItemType `json:"type,omitempty"`
	Start           int                `json:"start,omitempty"`
	Length          int                `json:"length,omitempty"`
	SelectionStart  int                `json:"selectionStart,omitempty"`
	SelectionLength int                `json:"selectionLength,omitempty"`
}

CompletionItem: CompletionItems are the suggestions returned from the CompletionsRequest.

type CompletionItemType

type CompletionItemType string

CompletionItemType: Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.

type CompletionsArguments

type CompletionsArguments struct {
	FrameId int    `json:"frameId,omitempty"`
	Text    string `json:"text"`
	Column  int    `json:"column"`
	Line    int    `json:"line,omitempty"`
}

CompletionsArguments: Arguments for 'completions' request.

type CompletionsRequest

type CompletionsRequest struct {
	Request

	Arguments CompletionsArguments `json:"arguments"`
}

CompletionsRequest: Returns a list of possible completions for a given caret position and text. Clients should only call this request if the capability 'supportsCompletionsRequest' is true.

func (*CompletionsRequest) GetRequest added in v0.3.0

func (r *CompletionsRequest) GetRequest() *Request

type CompletionsResponse

type CompletionsResponse struct {
	Response

	Body CompletionsResponseBody `json:"body"`
}

CompletionsResponse: Response to 'completions' request.

func (*CompletionsResponse) GetResponse added in v0.3.0

func (r *CompletionsResponse) GetResponse() *Response

type CompletionsResponseBody

type CompletionsResponseBody struct {
	Targets []CompletionItem `json:"targets"`
}

type ConfigurationDoneArguments

type ConfigurationDoneArguments struct {
}

ConfigurationDoneArguments: Arguments for 'configurationDone' request.

type ConfigurationDoneRequest

type ConfigurationDoneRequest struct {
	Request

	Arguments ConfigurationDoneArguments `json:"arguments,omitempty"`
}

ConfigurationDoneRequest: This optional request indicates that the client has finished initialization of the debug adapter. So it is the last request in the sequence of configuration requests (which was started by the 'initialized' event). Clients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.

func (*ConfigurationDoneRequest) GetRequest added in v0.3.0

func (r *ConfigurationDoneRequest) GetRequest() *Request

type ConfigurationDoneResponse

type ConfigurationDoneResponse struct {
	Response
}

ConfigurationDoneResponse: Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required.

func (*ConfigurationDoneResponse) GetResponse added in v0.3.0

func (r *ConfigurationDoneResponse) GetResponse() *Response

type ContinueArguments

type ContinueArguments struct {
	ThreadId int `json:"threadId"`
}

ContinueArguments: Arguments for 'continue' request.

type ContinueRequest

type ContinueRequest struct {
	Request

	Arguments ContinueArguments `json:"arguments"`
}

ContinueRequest: The request starts the debuggee to run again.

func (*ContinueRequest) GetRequest added in v0.3.0

func (r *ContinueRequest) GetRequest() *Request

type ContinueResponse

type ContinueResponse struct {
	Response

	Body ContinueResponseBody `json:"body"`
}

ContinueResponse: Response to 'continue' request.

func (*ContinueResponse) GetResponse added in v0.3.0

func (r *ContinueResponse) GetResponse() *Response

type ContinueResponseBody

type ContinueResponseBody struct {
	AllThreadsContinued bool `json:"allThreadsContinued"`
}

type ContinuedEvent

type ContinuedEvent struct {
	Event

	Body ContinuedEventBody `json:"body"`
}

ContinuedEvent: The event indicates that the execution of the debuggee has continued. Please note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'. It is only necessary to send a 'continued' event if there was no previous request that implied this.

func (*ContinuedEvent) GetEvent added in v0.3.0

func (e *ContinuedEvent) GetEvent() *Event

type ContinuedEventBody

type ContinuedEventBody struct {
	ThreadId            int  `json:"threadId"`
	AllThreadsContinued bool `json:"allThreadsContinued,omitempty"`
}

type DataBreakpoint

type DataBreakpoint struct {
	DataId       string                   `json:"dataId"`
	AccessType   DataBreakpointAccessType `json:"accessType,omitempty"`
	Condition    string                   `json:"condition,omitempty"`
	HitCondition string                   `json:"hitCondition,omitempty"`
}

DataBreakpoint: Properties of a data breakpoint passed to the setDataBreakpoints request.

type DataBreakpointAccessType

type DataBreakpointAccessType string

DataBreakpointAccessType: This enumeration defines all possible access types for data breakpoints.

type DataBreakpointInfoArguments

type DataBreakpointInfoArguments struct {
	VariablesReference int    `json:"variablesReference,omitempty"`
	Name               string `json:"name"`
}

DataBreakpointInfoArguments: Arguments for 'dataBreakpointInfo' request.

type DataBreakpointInfoRequest

type DataBreakpointInfoRequest struct {
	Request

	Arguments DataBreakpointInfoArguments `json:"arguments"`
}

DataBreakpointInfoRequest: Obtains information on a possible data breakpoint that could be set on an expression or variable. Clients should only call this request if the capability 'supportsDataBreakpoints' is true.

func (*DataBreakpointInfoRequest) GetRequest added in v0.3.0

func (r *DataBreakpointInfoRequest) GetRequest() *Request

type DataBreakpointInfoResponse

type DataBreakpointInfoResponse struct {
	Response

	Body DataBreakpointInfoResponseBody `json:"body"`
}

DataBreakpointInfoResponse: Response to 'dataBreakpointInfo' request.

func (*DataBreakpointInfoResponse) GetResponse added in v0.3.0

func (r *DataBreakpointInfoResponse) GetResponse() *Response

type DataBreakpointInfoResponseBody

type DataBreakpointInfoResponseBody struct {
	DataId      interface{}                `json:"dataId"`
	Description string                     `json:"description"`
	AccessTypes []DataBreakpointAccessType `json:"accessTypes,omitempty"`
	CanPersist  bool                       `json:"canPersist,omitempty"`
}

type DecodeProtocolMessageFieldError

type DecodeProtocolMessageFieldError struct {
	Seq        int
	SubType    string
	FieldName  string
	FieldValue string
}

DecodeProtocolMessageFieldError describes which JSON attribute has an unsupported value that the decoding cannot handle.

func (*DecodeProtocolMessageFieldError) Error

type DisassembleArguments

type DisassembleArguments struct {
	MemoryReference   string `json:"memoryReference"`
	Offset            int    `json:"offset,omitempty"`
	InstructionOffset int    `json:"instructionOffset,omitempty"`
	InstructionCount  int    `json:"instructionCount"`
	ResolveSymbols    bool   `json:"resolveSymbols,omitempty"`
}

DisassembleArguments: Arguments for 'disassemble' request.

type DisassembleRequest

type DisassembleRequest struct {
	Request

	Arguments DisassembleArguments `json:"arguments"`
}

DisassembleRequest: Disassembles code stored at the provided location. Clients should only call this request if the capability 'supportsDisassembleRequest' is true.

func (*DisassembleRequest) GetRequest added in v0.3.0

func (r *DisassembleRequest) GetRequest() *Request

type DisassembleResponse

type DisassembleResponse struct {
	Response

	Body DisassembleResponseBody `json:"body,omitempty"`
}

DisassembleResponse: Response to 'disassemble' request.

func (*DisassembleResponse) GetResponse added in v0.3.0

func (r *DisassembleResponse) GetResponse() *Response

type DisassembleResponseBody

type DisassembleResponseBody struct {
	Instructions []DisassembledInstruction `json:"instructions"`
}

type DisassembledInstruction

type DisassembledInstruction struct {
	Address          string `json:"address"`
	InstructionBytes string `json:"instructionBytes,omitempty"`
	Instruction      string `json:"instruction"`
	Symbol           string `json:"symbol,omitempty"`
	Location         Source `json:"location,omitempty"`
	Line             int    `json:"line,omitempty"`
	Column           int    `json:"column,omitempty"`
	EndLine          int    `json:"endLine,omitempty"`
	EndColumn        int    `json:"endColumn,omitempty"`
}

DisassembledInstruction: Represents a single disassembled instruction.

type DisconnectArguments

type DisconnectArguments struct {
	Restart           bool `json:"restart,omitempty"`
	TerminateDebuggee bool `json:"terminateDebuggee,omitempty"`
	SuspendDebuggee   bool `json:"suspendDebuggee,omitempty"`
}

DisconnectArguments: Arguments for 'disconnect' request.

type DisconnectRequest

type DisconnectRequest struct {
	Request

	Arguments DisconnectArguments `json:"arguments,omitempty"`
}

DisconnectRequest: The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging. It asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter. If the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee. If the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee. This behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).

func (*DisconnectRequest) GetRequest added in v0.3.0

func (r *DisconnectRequest) GetRequest() *Request

type DisconnectResponse

type DisconnectResponse struct {
	Response
}

DisconnectResponse: Response to 'disconnect' request. This is just an acknowledgement, so no body field is required.

func (*DisconnectResponse) GetResponse added in v0.3.0

func (r *DisconnectResponse) GetResponse() *Response

type ErrorMessage

type ErrorMessage struct {
	Id            int               `json:"id"`
	Format        string            `json:"format"`
	Variables     map[string]string `json:"variables,omitempty"`
	SendTelemetry bool              `json:"sendTelemetry,omitempty"`
	ShowUser      bool              `json:"showUser"`
	Url           string            `json:"url,omitempty"`
	UrlLabel      string            `json:"urlLabel,omitempty"`
}

ErrorMessage: A structured message object. Used to return errors from requests.

type ErrorResponse

type ErrorResponse struct {
	Response

	Body ErrorResponseBody `json:"body"`
}

ErrorResponse: On error (whenever 'success' is false), the body can provide more details.

func (*ErrorResponse) GetResponse added in v0.3.0

func (r *ErrorResponse) GetResponse() *Response

type ErrorResponseBody

type ErrorResponseBody struct {
	Error ErrorMessage `json:"error,omitempty"`
}

type EvaluateArguments

type EvaluateArguments struct {
	Expression string      `json:"expression"`
	FrameId    int         `json:"frameId,omitempty"`
	Context    string      `json:"context,omitempty"`
	Format     ValueFormat `json:"format,omitempty"`
}

EvaluateArguments: Arguments for 'evaluate' request.

type EvaluateRequest

type EvaluateRequest struct {
	Request

	Arguments EvaluateArguments `json:"arguments"`
}

EvaluateRequest: Evaluates the given expression in the context of the top most stack frame. The expression has access to any variables and arguments that are in scope.

func (*EvaluateRequest) GetRequest added in v0.3.0

func (r *EvaluateRequest) GetRequest() *Request

type EvaluateResponse

type EvaluateResponse struct {
	Response

	Body EvaluateResponseBody `json:"body"`
}

EvaluateResponse: Response to 'evaluate' request.

func (*EvaluateResponse) GetResponse added in v0.3.0

func (r *EvaluateResponse) GetResponse() *Response

type EvaluateResponseBody

type EvaluateResponseBody struct {
	Result             string                   `json:"result"`
	Type               string                   `json:"type,omitempty"`
	PresentationHint   VariablePresentationHint `json:"presentationHint,omitempty"`
	VariablesReference int                      `json:"variablesReference"`
	NamedVariables     int                      `json:"namedVariables,omitempty"`
	IndexedVariables   int                      `json:"indexedVariables,omitempty"`
	MemoryReference    string                   `json:"memoryReference,omitempty"`
}

type Event

type Event struct {
	ProtocolMessage

	Event string `json:"event"`
}

Event: A debug adapter initiated event.

type EventMessage added in v0.3.0

type EventMessage interface {
	Message
	// GetEvent provides access to the embedded Event.
	GetEvent() *Event
}

EventMessage is an interface implemented by all Event-types.

type ExceptionBreakMode

type ExceptionBreakMode string

ExceptionBreakMode: 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.

type ExceptionBreakpointsFilter

type ExceptionBreakpointsFilter struct {
	Filter               string `json:"filter"`
	Label                string `json:"label"`
	Description          string `json:"description,omitempty"`
	Default              bool   `json:"default,omitempty"`
	SupportsCondition    bool   `json:"supportsCondition,omitempty"`
	ConditionDescription string `json:"conditionDescription,omitempty"`
}

ExceptionBreakpointsFilter: An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.

type ExceptionDetails

type ExceptionDetails struct {
	Message        string             `json:"message,omitempty"`
	TypeName       string             `json:"typeName,omitempty"`
	FullTypeName   string             `json:"fullTypeName,omitempty"`
	EvaluateName   string             `json:"evaluateName,omitempty"`
	StackTrace     string             `json:"stackTrace,omitempty"`
	InnerException []ExceptionDetails `json:"innerException,omitempty"`
}

ExceptionDetails: Detailed information about an exception that has occurred.

type ExceptionFilterOptions added in v0.5.0

type ExceptionFilterOptions struct {
	FilterId  string `json:"filterId"`
	Condition string `json:"condition,omitempty"`
}

ExceptionFilterOptions: An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.

type ExceptionInfoArguments

type ExceptionInfoArguments struct {
	ThreadId int `json:"threadId"`
}

ExceptionInfoArguments: Arguments for 'exceptionInfo' request.

type ExceptionInfoRequest

type ExceptionInfoRequest struct {
	Request

	Arguments ExceptionInfoArguments `json:"arguments"`
}

ExceptionInfoRequest: Retrieves the details of the exception that caused this event to be raised. Clients should only call this request if the capability 'supportsExceptionInfoRequest' is true.

func (*ExceptionInfoRequest) GetRequest added in v0.3.0

func (r *ExceptionInfoRequest) GetRequest() *Request

type ExceptionInfoResponse

type ExceptionInfoResponse struct {
	Response

	Body ExceptionInfoResponseBody `json:"body"`
}

ExceptionInfoResponse: Response to 'exceptionInfo' request.

func (*ExceptionInfoResponse) GetResponse added in v0.3.0

func (r *ExceptionInfoResponse) GetResponse() *Response

type ExceptionInfoResponseBody

type ExceptionInfoResponseBody struct {
	ExceptionId string             `json:"exceptionId"`
	Description string             `json:"description,omitempty"`
	BreakMode   ExceptionBreakMode `json:"breakMode"`
	Details     ExceptionDetails   `json:"details,omitempty"`
}

type ExceptionOptions

type ExceptionOptions struct {
	Path      []ExceptionPathSegment `json:"path,omitempty"`
	BreakMode ExceptionBreakMode     `json:"breakMode"`
}

ExceptionOptions: An ExceptionOptions assigns configuration options to a set of exceptions.

type ExceptionPathSegment

type ExceptionPathSegment struct {
	Negate bool     `json:"negate,omitempty"`
	Names  []string `json:"names"`
}

ExceptionPathSegment: An ExceptionPathSegment represents 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 if 'negate' is false or missing or it matches anything except the names provided if 'negate' is true.

type ExitedEvent

type ExitedEvent struct {
	Event

	Body ExitedEventBody `json:"body"`
}

ExitedEvent: The event indicates that the debuggee has exited and returns its exit code.

func (*ExitedEvent) GetEvent added in v0.3.0

func (e *ExitedEvent) GetEvent() *Event

type ExitedEventBody

type ExitedEventBody struct {
	ExitCode int `json:"exitCode"`
}

type FunctionBreakpoint

type FunctionBreakpoint struct {
	Name         string `json:"name"`
	Condition    string `json:"condition,omitempty"`
	HitCondition string `json:"hitCondition,omitempty"`
}

FunctionBreakpoint: Properties of a breakpoint passed to the setFunctionBreakpoints request.

type GotoArguments

type GotoArguments struct {
	ThreadId int `json:"threadId"`
	TargetId int `json:"targetId"`
}

GotoArguments: Arguments for 'goto' request.

type GotoRequest

type GotoRequest struct {
	Request

	Arguments GotoArguments `json:"arguments"`
}

GotoRequest: The request sets the location where the debuggee will continue to run. This makes it possible to skip the execution of code or to executed code again. The code between the current location and the goto target is not executed but skipped. The debug adapter first sends the response and then a 'stopped' event with reason 'goto'. Clients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).

func (*GotoRequest) GetRequest added in v0.3.0

func (r *GotoRequest) GetRequest() *Request

type GotoResponse

type GotoResponse struct {
	Response
}

GotoResponse: Response to 'goto' request. This is just an acknowledgement, so no body field is required.

func (*GotoResponse) GetResponse added in v0.3.0

func (r *GotoResponse) GetResponse() *Response

type GotoTarget

type GotoTarget struct {
	Id                          int    `json:"id"`
	Label                       string `json:"label"`
	Line                        int    `json:"line"`
	Column                      int    `json:"column,omitempty"`
	EndLine                     int    `json:"endLine,omitempty"`
	EndColumn                   int    `json:"endColumn,omitempty"`
	InstructionPointerReference string `json:"instructionPointerReference,omitempty"`
}

GotoTarget: A GotoTarget describes a code location that can be used as a target in the 'goto' request. The possible goto targets can be determined via the 'gotoTargets' request.

type GotoTargetsArguments

type GotoTargetsArguments struct {
	Source Source `json:"source"`
	Line   int    `json:"line"`
	Column int    `json:"column,omitempty"`
}

GotoTargetsArguments: Arguments for 'gotoTargets' request.

type GotoTargetsRequest

type GotoTargetsRequest struct {
	Request

	Arguments GotoTargetsArguments `json:"arguments"`
}

GotoTargetsRequest: This request retrieves the possible goto targets for the specified source location. These targets can be used in the 'goto' request. Clients should only call this request if the capability 'supportsGotoTargetsRequest' is true.

func (*GotoTargetsRequest) GetRequest added in v0.3.0

func (r *GotoTargetsRequest) GetRequest() *Request

type GotoTargetsResponse

type GotoTargetsResponse struct {
	Response

	Body GotoTargetsResponseBody `json:"body"`
}

GotoTargetsResponse: Response to 'gotoTargets' request.

func (*GotoTargetsResponse) GetResponse added in v0.3.0

func (r *GotoTargetsResponse) GetResponse() *Response

type GotoTargetsResponseBody

type GotoTargetsResponseBody struct {
	Targets []GotoTarget `json:"targets"`
}

type InitializeRequest

type InitializeRequest struct {
	Request

	Arguments InitializeRequestArguments `json:"arguments"`
}

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. Until the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter. In addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response. The 'initialize' request may only be sent once.

func (*InitializeRequest) GetRequest added in v0.3.0

func (r *InitializeRequest) GetRequest() *Request

type InitializeRequestArguments

type InitializeRequestArguments struct {
	ClientID                     string `json:"clientID,omitempty"`
	ClientName                   string `json:"clientName,omitempty"`
	AdapterID                    string `json:"adapterID"`
	Locale                       string `json:"locale,omitempty"`
	LinesStartAt1                bool   `json:"linesStartAt1"`
	ColumnsStartAt1              bool   `json:"columnsStartAt1"`
	PathFormat                   string `json:"pathFormat,omitempty"`
	SupportsVariableType         bool   `json:"supportsVariableType,omitempty"`
	SupportsVariablePaging       bool   `json:"supportsVariablePaging,omitempty"`
	SupportsRunInTerminalRequest bool   `json:"supportsRunInTerminalRequest,omitempty"`
	SupportsMemoryReferences     bool   `json:"supportsMemoryReferences,omitempty"`
	SupportsProgressReporting    bool   `json:"supportsProgressReporting,omitempty"`
	SupportsInvalidatedEvent     bool   `json:"supportsInvalidatedEvent,omitempty"`
	SupportsMemoryEvent          bool   `json:"supportsMemoryEvent,omitempty"`
}

InitializeRequestArguments: Arguments for 'initialize' request.

type InitializeResponse

type InitializeResponse struct {
	Response

	Body Capabilities `json:"body,omitempty"`
}

InitializeResponse: Response to 'initialize' request.

func (*InitializeResponse) GetResponse added in v0.3.0

func (r *InitializeResponse) GetResponse() *Response

type InitializedEvent

type InitializedEvent struct {
	Event
}

InitializedEvent: This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest). A debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished). The sequence of events/requests is as follows: - adapters sends 'initialized' event (after the 'initialize' request has returned) - frontend sends zero or more 'setBreakpoints' requests - frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true) - frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false) - frontend sends other future configuration requests - frontend sends one 'configurationDone' request to indicate the end of the configuration.

func (*InitializedEvent) GetEvent added in v0.3.0

func (e *InitializedEvent) GetEvent() *Event

type InstructionBreakpoint added in v0.3.0

type InstructionBreakpoint struct {
	InstructionReference string `json:"instructionReference"`
	Offset               int    `json:"offset,omitempty"`
	Condition            string `json:"condition,omitempty"`
	HitCondition         string `json:"hitCondition,omitempty"`
}

InstructionBreakpoint: Properties of a breakpoint passed to the setInstructionBreakpoints request

type InvalidatedAreas added in v0.5.0

type InvalidatedAreas string

InvalidatedAreas: Logical areas that can be invalidated by the 'invalidated' event.

type InvalidatedEvent added in v0.5.0

type InvalidatedEvent struct {
	Event

	Body InvalidatedEventBody `json:"body"`
}

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. Debug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter. This event should only be sent if the debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.

func (*InvalidatedEvent) GetEvent added in v0.5.0

func (e *InvalidatedEvent) GetEvent() *Event

type InvalidatedEventBody added in v0.5.0

type InvalidatedEventBody struct {
	Areas        []InvalidatedAreas `json:"areas,omitempty"`
	ThreadId     int                `json:"threadId,omitempty"`
	StackFrameId int                `json:"stackFrameId,omitempty"`
}

type LaunchAttachRequest added in v0.4.0

type LaunchAttachRequest interface {
	RequestMessage
	// GetArguments provides access to the Arguments map.
	GetArguments() json.RawMessage
}

LaunchAttachRequest is an interface implemented by LaunchRequest and AttachRequest as they contain shared implementation specific arguments that are not part of the specification.

type LaunchRequest

type LaunchRequest struct {
	Request

	Arguments json.RawMessage `json:"arguments"`
}

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). Since launching is debugger/runtime specific, the arguments for this request are not part of this specification.

func (*LaunchRequest) GetArguments added in v0.4.0

func (r *LaunchRequest) GetArguments() json.RawMessage

func (*LaunchRequest) GetRequest added in v0.3.0

func (r *LaunchRequest) GetRequest() *Request

type LaunchResponse

type LaunchResponse struct {
	Response
}

LaunchResponse: Response to 'launch' request. This is just an acknowledgement, so no body field is required.

func (*LaunchResponse) GetResponse added in v0.3.0

func (r *LaunchResponse) GetResponse() *Response

type LoadedSourceEvent

type LoadedSourceEvent struct {
	Event

	Body LoadedSourceEventBody `json:"body"`
}

LoadedSourceEvent: The event indicates that some source has been added, changed, or removed from the set of all loaded sources.

func (*LoadedSourceEvent) GetEvent added in v0.3.0

func (e *LoadedSourceEvent) GetEvent() *Event

type LoadedSourceEventBody

type LoadedSourceEventBody struct {
	Reason string `json:"reason"`
	Source Source `json:"source"`
}

type LoadedSourcesArguments

type LoadedSourcesArguments struct {
}

LoadedSourcesArguments: Arguments for 'loadedSources' request.

type LoadedSourcesRequest

type LoadedSourcesRequest struct {
	Request

	Arguments LoadedSourcesArguments `json:"arguments,omitempty"`
}

LoadedSourcesRequest: Retrieves the set of all sources currently loaded by the debugged process. Clients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.

func (*LoadedSourcesRequest) GetRequest added in v0.3.0

func (r *LoadedSourcesRequest) GetRequest() *Request

type LoadedSourcesResponse

type LoadedSourcesResponse struct {
	Response

	Body LoadedSourcesResponseBody `json:"body"`
}

LoadedSourcesResponse: Response to 'loadedSources' request.

func (*LoadedSourcesResponse) GetResponse added in v0.3.0

func (r *LoadedSourcesResponse) GetResponse() *Response

type LoadedSourcesResponseBody

type LoadedSourcesResponseBody struct {
	Sources []Source `json:"sources"`
}

type MemoryEvent added in v0.6.0

type MemoryEvent struct {
	Event

	Body MemoryEventBody `json:"body"`
}

MemoryEvent: This event indicates that some memory range has been updated. It should only be sent if the debug adapter has received a value true for the `supportsMemoryEvent` capability of the `initialize` request. Clients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap. Debug adapters can use this event to indicate that the contents of a memory range has changed due to some other DAP request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.

func (*MemoryEvent) GetEvent added in v0.6.0

func (e *MemoryEvent) GetEvent() *Event

type MemoryEventBody added in v0.6.0

type MemoryEventBody struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset"`
	Count           int    `json:"count"`
}

type Message

type Message interface {
	GetSeq() int
}

Message is an interface that all DAP message types implement with pointer receivers. It's not part of the protocol but is used to enforce static typing in Go code and provide some common accessors.

Note: the DAP type "Message" (which is used in the body of ErrorResponse) is renamed to ErrorMessage to avoid collision with this interface.

func DecodeProtocolMessage

func DecodeProtocolMessage(data []byte) (Message, error)

DecodeProtocolMessage parses the JSON-encoded data and returns the result of the appropriate type within the ProtocolMessage hierarchy. If message type, command, etc cannot be cast, returns DecodeProtocolMessageFieldError. See also godoc for json.Unmarshal, which is used for underlying decoding.

func ReadProtocolMessage

func ReadProtocolMessage(r *bufio.Reader) (Message, error)

ReadProtocolMessage reads a message from r, decodes and returns it.

type Module

type Module struct {
	Id             interface{} `json:"id"`
	Name           string      `json:"name"`
	Path           string      `json:"path,omitempty"`
	IsOptimized    bool        `json:"isOptimized,omitempty"`
	IsUserCode     bool        `json:"isUserCode,omitempty"`
	Version        string      `json:"version,omitempty"`
	SymbolStatus   string      `json:"symbolStatus,omitempty"`
	SymbolFilePath string      `json:"symbolFilePath,omitempty"`
	DateTimeStamp  string      `json:"dateTimeStamp,omitempty"`
	AddressRange   string      `json:"addressRange,omitempty"`
}

Module: A Module object represents a row in the modules view. Two attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting. The name is used to minimally render the module in the UI.

Additional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor.

To avoid an unnecessary proliferation of additional attributes with similar semantics but different names we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.

type ModuleEvent

type ModuleEvent struct {
	Event

	Body ModuleEventBody `json:"body"`
}

ModuleEvent: The event indicates that some information about a module has changed.

func (*ModuleEvent) GetEvent added in v0.3.0

func (e *ModuleEvent) GetEvent() *Event

type ModuleEventBody

type ModuleEventBody struct {
	Reason string `json:"reason"`
	Module Module `json:"module"`
}

type ModulesArguments

type ModulesArguments struct {
	StartModule int `json:"startModule,omitempty"`
	ModuleCount int `json:"moduleCount,omitempty"`
}

ModulesArguments: Arguments for 'modules' request.

type ModulesRequest

type ModulesRequest struct {
	Request

	Arguments ModulesArguments `json:"arguments"`
}

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. Clients should only call this request if the capability 'supportsModulesRequest' is true.

func (*ModulesRequest) GetRequest added in v0.3.0

func (r *ModulesRequest) GetRequest() *Request

type ModulesResponse

type ModulesResponse struct {
	Response

	Body ModulesResponseBody `json:"body"`
}

ModulesResponse: Response to 'modules' request.

func (*ModulesResponse) GetResponse added in v0.3.0

func (r *ModulesResponse) GetResponse() *Response

type ModulesResponseBody

type ModulesResponseBody struct {
	Modules      []Module `json:"modules"`
	TotalModules int      `json:"totalModules,omitempty"`
}

type ModulesViewDescriptor

type ModulesViewDescriptor struct {
	Columns []ColumnDescriptor `json:"columns"`
}

ModulesViewDescriptor: The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView. For now it only specifies the columns to be shown in the modules view.

type NextArguments

type NextArguments struct {
	ThreadId    int                 `json:"threadId"`
	Granularity SteppingGranularity `json:"granularity,omitempty"`
}

NextArguments: Arguments for 'next' request.

type NextRequest

type NextRequest struct {
	Request

	Arguments NextArguments `json:"arguments"`
}

NextRequest: The request starts the debuggee to run again for one step. The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.

func (*NextRequest) GetRequest added in v0.3.0

func (r *NextRequest) GetRequest() *Request

type NextResponse

type NextResponse struct {
	Response
}

NextResponse: Response to 'next' request. This is just an acknowledgement, so no body field is required.

func (*NextResponse) GetResponse added in v0.3.0

func (r *NextResponse) GetResponse() *Response

type OutputEvent

type OutputEvent struct {
	Event

	Body OutputEventBody `json:"body"`
}

OutputEvent: The event indicates that the target has produced some output.

func (*OutputEvent) GetEvent added in v0.3.0

func (e *OutputEvent) GetEvent() *Event

type OutputEventBody

type OutputEventBody struct {
	Category           string      `json:"category,omitempty"`
	Output             string      `json:"output"`
	Group              string      `json:"group,omitempty"`
	VariablesReference int         `json:"variablesReference,omitempty"`
	Source             Source      `json:"source,omitempty"`
	Line               int         `json:"line,omitempty"`
	Column             int         `json:"column,omitempty"`
	Data               interface{} `json:"data,omitempty"`
}

type PauseArguments

type PauseArguments struct {
	ThreadId int `json:"threadId"`
}

PauseArguments: Arguments for 'pause' request.

type PauseRequest

type PauseRequest struct {
	Request

	Arguments PauseArguments `json:"arguments"`
}

PauseRequest: The request suspends the debuggee. The debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.

func (*PauseRequest) GetRequest added in v0.3.0

func (r *PauseRequest) GetRequest() *Request

type PauseResponse

type PauseResponse struct {
	Response
}

PauseResponse: Response to 'pause' request. This is just an acknowledgement, so no body field is required.

func (*PauseResponse) GetResponse added in v0.3.0

func (r *PauseResponse) GetResponse() *Response

type ProcessEvent

type ProcessEvent struct {
	Event

	Body ProcessEventBody `json:"body"`
}

ProcessEvent: The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.

func (*ProcessEvent) GetEvent added in v0.3.0

func (e *ProcessEvent) GetEvent() *Event

type ProcessEventBody

type ProcessEventBody struct {
	Name            string `json:"name"`
	SystemProcessId int    `json:"systemProcessId,omitempty"`
	IsLocalProcess  bool   `json:"isLocalProcess,omitempty"`
	StartMethod     string `json:"startMethod,omitempty"`
	PointerSize     int    `json:"pointerSize,omitempty"`
}

type ProgressEndEvent added in v0.3.0

type ProgressEndEvent struct {
	Event

	Body ProgressEndEventBody `json:"body"`
}

ProgressEndEvent: The event signals the end of the progress reporting with an optional final message. This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.

func (*ProgressEndEvent) GetEvent added in v0.3.0

func (e *ProgressEndEvent) GetEvent() *Event

type ProgressEndEventBody added in v0.3.0

type ProgressEndEventBody struct {
	ProgressId string `json:"progressId"`
	Message    string `json:"message,omitempty"`
}

type ProgressStartEvent added in v0.3.0

type ProgressStartEvent struct {
	Event

	Body ProgressStartEventBody `json:"body"`
}

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. The client is free to delay the showing of the UI in order to reduce flicker. This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.

func (*ProgressStartEvent) GetEvent added in v0.3.0

func (e *ProgressStartEvent) GetEvent() *Event

type ProgressStartEventBody added in v0.3.0

type ProgressStartEventBody struct {
	ProgressId  string `json:"progressId"`
	Title       string `json:"title"`
	RequestId   int    `json:"requestId,omitempty"`
	Cancellable bool   `json:"cancellable,omitempty"`
	Message     string `json:"message,omitempty"`
	Percentage  int    `json:"percentage,omitempty"`
}

type ProgressUpdateEvent added in v0.3.0

type ProgressUpdateEvent struct {
	Event

	Body ProgressUpdateEventBody `json:"body"`
}

ProgressUpdateEvent: The event signals that the progress reporting needs to updated with a new message and/or percentage. The client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values. This event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.

func (*ProgressUpdateEvent) GetEvent added in v0.3.0

func (e *ProgressUpdateEvent) GetEvent() *Event

type ProgressUpdateEventBody added in v0.3.0

type ProgressUpdateEventBody struct {
	ProgressId string `json:"progressId"`
	Message    string `json:"message,omitempty"`
	Percentage int    `json:"percentage,omitempty"`
}

type ProtocolMessage

type ProtocolMessage struct {
	Seq  int    `json:"seq"`
	Type string `json:"type"`
}

ProtocolMessage: Base class of requests, responses, and events.

func (*ProtocolMessage) GetSeq added in v0.3.0

func (m *ProtocolMessage) GetSeq() int

type ReadMemoryArguments

type ReadMemoryArguments struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset,omitempty"`
	Count           int    `json:"count"`
}

ReadMemoryArguments: Arguments for 'readMemory' request.

type ReadMemoryRequest

type ReadMemoryRequest struct {
	Request

	Arguments ReadMemoryArguments `json:"arguments"`
}

ReadMemoryRequest: Reads bytes from memory at the provided location. Clients should only call this request if the capability 'supportsReadMemoryRequest' is true.

func (*ReadMemoryRequest) GetRequest added in v0.3.0

func (r *ReadMemoryRequest) GetRequest() *Request

type ReadMemoryResponse

type ReadMemoryResponse struct {
	Response

	Body ReadMemoryResponseBody `json:"body,omitempty"`
}

ReadMemoryResponse: Response to 'readMemory' request.

func (*ReadMemoryResponse) GetResponse added in v0.3.0

func (r *ReadMemoryResponse) GetResponse() *Response

type ReadMemoryResponseBody

type ReadMemoryResponseBody struct {
	Address         string `json:"address"`
	UnreadableBytes int    `json:"unreadableBytes,omitempty"`
	Data            string `json:"data,omitempty"`
}

type Request

type Request struct {
	ProtocolMessage

	Command string `json:"command"`
}

Request: A client or debug adapter initiated request.

type RequestMessage added in v0.3.0

type RequestMessage interface {
	Message
	// GetRequest provides access to the embedded Request.
	GetRequest() *Request
}

RequestMessage is an interface implemented by all Request-types.

type Response

type Response struct {
	ProtocolMessage

	RequestSeq int    `json:"request_seq"`
	Success    bool   `json:"success"`
	Command    string `json:"command"`
	Message    string `json:"message,omitempty"`
}

Response: Response for a request.

type ResponseMessage added in v0.3.0

type ResponseMessage interface {
	Message
	// GetResponse provides access to the embedded Response.
	GetResponse() *Response
}

ResponseMessage is an interface implemented by all Response-types.

type RestartArguments

type RestartArguments struct {
	Arguments interface{} `json:"arguments,omitempty"`
}

RestartArguments: Arguments for 'restart' request.

type RestartFrameArguments

type RestartFrameArguments struct {
	FrameId int `json:"frameId"`
}

RestartFrameArguments: Arguments for 'restartFrame' request.

type RestartFrameRequest

type RestartFrameRequest struct {
	Request

	Arguments RestartFrameArguments `json:"arguments"`
}

RestartFrameRequest: The request restarts execution of the specified stackframe. The debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed. Clients should only call this request if the capability 'supportsRestartFrame' is true.

func (*RestartFrameRequest) GetRequest added in v0.3.0

func (r *RestartFrameRequest) GetRequest() *Request

type RestartFrameResponse

type RestartFrameResponse struct {
	Response
}

RestartFrameResponse: Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required.

func (*RestartFrameResponse) GetResponse added in v0.3.0

func (r *RestartFrameResponse) GetResponse() *Response

type RestartRequest

type RestartRequest struct {
	Request

	Arguments RestartArguments `json:"arguments,omitempty"`
}

RestartRequest: Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true. If the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.

func (*RestartRequest) GetRequest added in v0.3.0

func (r *RestartRequest) GetRequest() *Request

type RestartResponse

type RestartResponse struct {
	Response
}

RestartResponse: Response to 'restart' request. This is just an acknowledgement, so no body field is required.

func (*RestartResponse) GetResponse added in v0.3.0

func (r *RestartResponse) GetResponse() *Response

type ReverseContinueArguments

type ReverseContinueArguments struct {
	ThreadId int `json:"threadId"`
}

ReverseContinueArguments: Arguments for 'reverseContinue' request.

type ReverseContinueRequest

type ReverseContinueRequest struct {
	Request

	Arguments ReverseContinueArguments `json:"arguments"`
}

ReverseContinueRequest: The request starts the debuggee to run backward. Clients should only call this request if the capability 'supportsStepBack' is true.

func (*ReverseContinueRequest) GetRequest added in v0.3.0

func (r *ReverseContinueRequest) GetRequest() *Request

type ReverseContinueResponse

type ReverseContinueResponse struct {
	Response
}

ReverseContinueResponse: Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required.

func (*ReverseContinueResponse) GetResponse added in v0.3.0

func (r *ReverseContinueResponse) GetResponse() *Response

type RunInTerminalRequest

type RunInTerminalRequest struct {
	Request

	Arguments RunInTerminalRequestArguments `json:"arguments"`
}

RunInTerminalRequest: This optional request is sent from the debug adapter to the client to run a command in a terminal. This is typically used to launch the debuggee in a terminal provided by the client. This request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.

func (*RunInTerminalRequest) GetRequest added in v0.3.0

func (r *RunInTerminalRequest) GetRequest() *Request

type RunInTerminalRequestArguments

type RunInTerminalRequestArguments struct {
	Kind  string                 `json:"kind,omitempty"`
	Title string                 `json:"title,omitempty"`
	Cwd   string                 `json:"cwd"`
	Args  []string               `json:"args"`
	Env   map[string]interface{} `json:"env,omitempty"`
}

RunInTerminalRequestArguments: Arguments for 'runInTerminal' request.

type RunInTerminalResponse

type RunInTerminalResponse struct {
	Response

	Body RunInTerminalResponseBody `json:"body"`
}

RunInTerminalResponse: Response to 'runInTerminal' request.

func (*RunInTerminalResponse) GetResponse added in v0.3.0

func (r *RunInTerminalResponse) GetResponse() *Response

type RunInTerminalResponseBody

type RunInTerminalResponseBody struct {
	ProcessId      int `json:"processId,omitempty"`
	ShellProcessId int `json:"shellProcessId,omitempty"`
}

type Scope

type Scope struct {
	Name               string `json:"name"`
	PresentationHint   string `json:"presentationHint,omitempty"`
	VariablesReference int    `json:"variablesReference"`
	NamedVariables     int    `json:"namedVariables,omitempty"`
	IndexedVariables   int    `json:"indexedVariables,omitempty"`
	Expensive          bool   `json:"expensive"`
	Source             Source `json:"source,omitempty"`
	Line               int    `json:"line,omitempty"`
	Column             int    `json:"column,omitempty"`
	EndLine            int    `json:"endLine,omitempty"`
	EndColumn          int    `json:"endColumn,omitempty"`
}

Scope: A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.

type ScopesArguments

type ScopesArguments struct {
	FrameId int `json:"frameId"`
}

ScopesArguments: Arguments for 'scopes' request.

type ScopesRequest

type ScopesRequest struct {
	Request

	Arguments ScopesArguments `json:"arguments"`
}

ScopesRequest: The request returns the variable scopes for a given stackframe ID.

func (*ScopesRequest) GetRequest added in v0.3.0

func (r *ScopesRequest) GetRequest() *Request

type ScopesResponse

type ScopesResponse struct {
	Response

	Body ScopesResponseBody `json:"body"`
}

ScopesResponse: Response to 'scopes' request.

func (*ScopesResponse) GetResponse added in v0.3.0

func (r *ScopesResponse) GetResponse() *Response

type ScopesResponseBody

type ScopesResponseBody struct {
	Scopes []Scope `json:"scopes"`
}

type SetBreakpointsArguments

type SetBreakpointsArguments struct {
	Source         Source             `json:"source"`
	Breakpoints    []SourceBreakpoint `json:"breakpoints,omitempty"`
	Lines          []int              `json:"lines,omitempty"`
	SourceModified bool               `json:"sourceModified,omitempty"`
}

SetBreakpointsArguments: Arguments for 'setBreakpoints' request.

type SetBreakpointsRequest

type SetBreakpointsRequest struct {
	Request

	Arguments SetBreakpointsArguments `json:"arguments"`
}

SetBreakpointsRequest: Sets multiple breakpoints for a single source and clears all previous breakpoints in that source. To clear all breakpoint for a source, specify an empty array. When a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.

func (*SetBreakpointsRequest) GetRequest added in v0.3.0

func (r *SetBreakpointsRequest) GetRequest() *Request

type SetBreakpointsResponse

type SetBreakpointsResponse struct {
	Response

	Body SetBreakpointsResponseBody `json:"body"`
}

SetBreakpointsResponse: Response to 'setBreakpoints' request. 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 the 'breakpoints' (or the deprecated 'lines') array in the arguments.

func (*SetBreakpointsResponse) GetResponse added in v0.3.0

func (r *SetBreakpointsResponse) GetResponse() *Response

type SetBreakpointsResponseBody

type SetBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

type SetDataBreakpointsArguments

type SetDataBreakpointsArguments struct {
	Breakpoints []DataBreakpoint `json:"breakpoints"`
}

SetDataBreakpointsArguments: Arguments for 'setDataBreakpoints' request.

type SetDataBreakpointsRequest

type SetDataBreakpointsRequest struct {
	Request

	Arguments SetDataBreakpointsArguments `json:"arguments"`
}

SetDataBreakpointsRequest: Replaces all existing data breakpoints with new data breakpoints. To clear all data breakpoints, specify an empty array. When a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated. Clients should only call this request if the capability 'supportsDataBreakpoints' is true.

func (*SetDataBreakpointsRequest) GetRequest added in v0.3.0

func (r *SetDataBreakpointsRequest) GetRequest() *Request

type SetDataBreakpointsResponse

type SetDataBreakpointsResponse struct {
	Response

	Body SetDataBreakpointsResponseBody `json:"body"`
}

SetDataBreakpointsResponse: Response to 'setDataBreakpoints' request. Returned is information about each breakpoint created by this request.

func (*SetDataBreakpointsResponse) GetResponse added in v0.3.0

func (r *SetDataBreakpointsResponse) GetResponse() *Response

type SetDataBreakpointsResponseBody

type SetDataBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

type SetExceptionBreakpointsArguments

type SetExceptionBreakpointsArguments struct {
	Filters          []string                 `json:"filters"`
	FilterOptions    []ExceptionFilterOptions `json:"filterOptions,omitempty"`
	ExceptionOptions []ExceptionOptions       `json:"exceptionOptions,omitempty"`
}

SetExceptionBreakpointsArguments: Arguments for 'setExceptionBreakpoints' request.

type SetExceptionBreakpointsRequest

type SetExceptionBreakpointsRequest struct {
	Request

	Arguments SetExceptionBreakpointsArguments `json:"arguments"`
}

SetExceptionBreakpointsRequest: The request configures the debuggers response to thrown exceptions. If an exception is configured to break, a 'stopped' event is fired (with reason 'exception'). Clients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.

func (*SetExceptionBreakpointsRequest) GetRequest added in v0.3.0

func (r *SetExceptionBreakpointsRequest) GetRequest() *Request

type SetExceptionBreakpointsResponse

type SetExceptionBreakpointsResponse struct {
	Response

	Body SetExceptionBreakpointsResponseBody `json:"body,omitempty"`
}

SetExceptionBreakpointsResponse: Response to 'setExceptionBreakpoints' request. The response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays given as arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information. The mandatory 'verified' property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the optional condition or hit count expressions are valid. In case of an error the 'message' property explains the problem. An optional 'id' property 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 the 'breakpoints' array and the enclosing 'body' are optional. If these elements are missing a client will not be able to show problems for individual exception breakpoints or filters.

func (*SetExceptionBreakpointsResponse) GetResponse added in v0.3.0

func (r *SetExceptionBreakpointsResponse) GetResponse() *Response

type SetExceptionBreakpointsResponseBody added in v0.5.0

type SetExceptionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints,omitempty"`
}

type SetExpressionArguments

type SetExpressionArguments struct {
	Expression string      `json:"expression"`
	Value      string      `json:"value"`
	FrameId    int         `json:"frameId,omitempty"`
	Format     ValueFormat `json:"format,omitempty"`
}

SetExpressionArguments: Arguments for 'setExpression' request.

type SetExpressionRequest

type SetExpressionRequest struct {
	Request

	Arguments SetExpressionArguments `json:"arguments"`
}

SetExpressionRequest: Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value. The expressions have access to any variables and arguments that are in scope of the specified frame. Clients should only call this request if the capability 'supportsSetExpression' is true. If a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.

func (*SetExpressionRequest) GetRequest added in v0.3.0

func (r *SetExpressionRequest) GetRequest() *Request

type SetExpressionResponse

type SetExpressionResponse struct {
	Response

	Body SetExpressionResponseBody `json:"body"`
}

SetExpressionResponse: Response to 'setExpression' request.

func (*SetExpressionResponse) GetResponse added in v0.3.0

func (r *SetExpressionResponse) GetResponse() *Response

type SetExpressionResponseBody

type SetExpressionResponseBody struct {
	Value              string                   `json:"value"`
	Type               string                   `json:"type,omitempty"`
	PresentationHint   VariablePresentationHint `json:"presentationHint,omitempty"`
	VariablesReference int                      `json:"variablesReference,omitempty"`
	NamedVariables     int                      `json:"namedVariables,omitempty"`
	IndexedVariables   int                      `json:"indexedVariables,omitempty"`
}

type SetFunctionBreakpointsArguments

type SetFunctionBreakpointsArguments struct {
	Breakpoints []FunctionBreakpoint `json:"breakpoints"`
}

SetFunctionBreakpointsArguments: Arguments for 'setFunctionBreakpoints' request.

type SetFunctionBreakpointsRequest

type SetFunctionBreakpointsRequest struct {
	Request

	Arguments SetFunctionBreakpointsArguments `json:"arguments"`
}

SetFunctionBreakpointsRequest: Replaces all existing function breakpoints with new function breakpoints. To clear all function breakpoints, specify an empty array. When a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated. Clients should only call this request if the capability 'supportsFunctionBreakpoints' is true.

func (*SetFunctionBreakpointsRequest) GetRequest added in v0.3.0

func (r *SetFunctionBreakpointsRequest) GetRequest() *Request

type SetFunctionBreakpointsResponse

type SetFunctionBreakpointsResponse struct {
	Response

	Body SetFunctionBreakpointsResponseBody `json:"body"`
}

SetFunctionBreakpointsResponse: Response to 'setFunctionBreakpoints' request. Returned is information about each breakpoint created by this request.

func (*SetFunctionBreakpointsResponse) GetResponse added in v0.3.0

func (r *SetFunctionBreakpointsResponse) GetResponse() *Response

type SetFunctionBreakpointsResponseBody

type SetFunctionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

type SetInstructionBreakpointsArguments added in v0.3.0

type SetInstructionBreakpointsArguments struct {
	Breakpoints []InstructionBreakpoint `json:"breakpoints"`
}

SetInstructionBreakpointsArguments: Arguments for 'setInstructionBreakpoints' request

type SetInstructionBreakpointsRequest added in v0.3.0

type SetInstructionBreakpointsRequest struct {
	Request

	Arguments SetInstructionBreakpointsArguments `json:"arguments"`
}

SetInstructionBreakpointsRequest: Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a diassembly window. To clear all instruction breakpoints, specify an empty array. When an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated. Clients should only call this request if the capability 'supportsInstructionBreakpoints' is true.

func (*SetInstructionBreakpointsRequest) GetRequest added in v0.3.0

func (r *SetInstructionBreakpointsRequest) GetRequest() *Request

type SetInstructionBreakpointsResponse added in v0.3.0

type SetInstructionBreakpointsResponse struct {
	Response

	Body SetInstructionBreakpointsResponseBody `json:"body"`
}

SetInstructionBreakpointsResponse: Response to 'setInstructionBreakpoints' request

func (*SetInstructionBreakpointsResponse) GetResponse added in v0.3.0

func (r *SetInstructionBreakpointsResponse) GetResponse() *Response

type SetInstructionBreakpointsResponseBody added in v0.3.0

type SetInstructionBreakpointsResponseBody struct {
	Breakpoints []Breakpoint `json:"breakpoints"`
}

type SetVariableArguments

type SetVariableArguments struct {
	VariablesReference int         `json:"variablesReference"`
	Name               string      `json:"name"`
	Value              string      `json:"value"`
	Format             ValueFormat `json:"format,omitempty"`
}

SetVariableArguments: Arguments for 'setVariable' request.

type SetVariableRequest

type SetVariableRequest struct {
	Request

	Arguments SetVariableArguments `json:"arguments"`
}

SetVariableRequest: Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true. If a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.

func (*SetVariableRequest) GetRequest added in v0.3.0

func (r *SetVariableRequest) GetRequest() *Request

type SetVariableResponse

type SetVariableResponse struct {
	Response

	Body SetVariableResponseBody `json:"body"`
}

SetVariableResponse: Response to 'setVariable' request.

func (*SetVariableResponse) GetResponse added in v0.3.0

func (r *SetVariableResponse) GetResponse() *Response

type SetVariableResponseBody

type SetVariableResponseBody struct {
	Value              string `json:"value"`
	Type               string `json:"type,omitempty"`
	VariablesReference int    `json:"variablesReference,omitempty"`
	NamedVariables     int    `json:"namedVariables,omitempty"`
	IndexedVariables   int    `json:"indexedVariables,omitempty"`
}

type Source

type Source struct {
	Name             string      `json:"name,omitempty"`
	Path             string      `json:"path,omitempty"`
	SourceReference  int         `json:"sourceReference,omitempty"`
	PresentationHint string      `json:"presentationHint,omitempty"`
	Origin           string      `json:"origin,omitempty"`
	Sources          []Source    `json:"sources,omitempty"`
	AdapterData      interface{} `json:"adapterData,omitempty"`
	Checksums        []Checksum  `json:"checksums,omitempty"`
}

Source: A Source is a descriptor for source code. It is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.

type SourceArguments

type SourceArguments struct {
	Source          Source `json:"source,omitempty"`
	SourceReference int    `json:"sourceReference"`
}

SourceArguments: Arguments for 'source' request.

type SourceBreakpoint

type SourceBreakpoint struct {
	Line         int    `json:"line"`
	Column       int    `json:"column,omitempty"`
	Condition    string `json:"condition,omitempty"`
	HitCondition string `json:"hitCondition,omitempty"`
	LogMessage   string `json:"logMessage,omitempty"`
}

SourceBreakpoint: Properties of a breakpoint or logpoint passed to the setBreakpoints request.

type SourceRequest

type SourceRequest struct {
	Request

	Arguments SourceArguments `json:"arguments"`
}

SourceRequest: The request retrieves the source code for a given source reference.

func (*SourceRequest) GetRequest added in v0.3.0

func (r *SourceRequest) GetRequest() *Request

type SourceResponse

type SourceResponse struct {
	Response

	Body SourceResponseBody `json:"body"`
}

SourceResponse: Response to 'source' request.

func (*SourceResponse) GetResponse added in v0.3.0

func (r *SourceResponse) GetResponse() *Response

type SourceResponseBody

type SourceResponseBody struct {
	Content  string `json:"content"`
	MimeType string `json:"mimeType,omitempty"`
}

type StackFrame

type StackFrame struct {
	Id                          int         `json:"id"`
	Name                        string      `json:"name"`
	Source                      Source      `json:"source,omitempty"`
	Line                        int         `json:"line"`
	Column                      int         `json:"column"`
	EndLine                     int         `json:"endLine,omitempty"`
	EndColumn                   int         `json:"endColumn,omitempty"`
	CanRestart                  bool        `json:"canRestart,omitempty"`
	InstructionPointerReference string      `json:"instructionPointerReference,omitempty"`
	ModuleId                    interface{} `json:"moduleId,omitempty"`
	PresentationHint            string      `json:"presentationHint,omitempty"`
}

StackFrame: A Stackframe contains the source location.

type StackFrameFormat

type StackFrameFormat struct {
	ValueFormat

	Parameters      bool `json:"parameters,omitempty"`
	ParameterTypes  bool `json:"parameterTypes,omitempty"`
	ParameterNames  bool `json:"parameterNames,omitempty"`
	ParameterValues bool `json:"parameterValues,omitempty"`
	Line            bool `json:"line,omitempty"`
	Module          bool `json:"module,omitempty"`
	IncludeAll      bool `json:"includeAll,omitempty"`
}

StackFrameFormat: Provides formatting information for a stack frame.

type StackTraceArguments

type StackTraceArguments struct {
	ThreadId   int              `json:"threadId"`
	StartFrame int              `json:"startFrame,omitempty"`
	Levels     int              `json:"levels,omitempty"`
	Format     StackFrameFormat `json:"format,omitempty"`
}

StackTraceArguments: Arguments for 'stackTrace' request.

type StackTraceRequest

type StackTraceRequest struct {
	Request

	Arguments StackTraceArguments `json:"arguments"`
}

StackTraceRequest: The request returns a stacktrace from the current execution state of a given thread. A client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.

func (*StackTraceRequest) GetRequest added in v0.3.0

func (r *StackTraceRequest) GetRequest() *Request

type StackTraceResponse

type StackTraceResponse struct {
	Response

	Body StackTraceResponseBody `json:"body"`
}

StackTraceResponse: Response to 'stackTrace' request.

func (*StackTraceResponse) GetResponse added in v0.3.0

func (r *StackTraceResponse) GetResponse() *Response

type StackTraceResponseBody

type StackTraceResponseBody struct {
	StackFrames []StackFrame `json:"stackFrames"`
	TotalFrames int          `json:"totalFrames,omitempty"`
}

type StepBackArguments

type StepBackArguments struct {
	ThreadId    int                 `json:"threadId"`
	Granularity SteppingGranularity `json:"granularity,omitempty"`
}

StepBackArguments: Arguments for 'stepBack' request.

type StepBackRequest

type StepBackRequest struct {
	Request

	Arguments StepBackArguments `json:"arguments"`
}

StepBackRequest: The request starts the debuggee to run one step backwards. The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed. Clients should only call this request if the capability 'supportsStepBack' is true.

func (*StepBackRequest) GetRequest added in v0.3.0

func (r *StepBackRequest) GetRequest() *Request

type StepBackResponse

type StepBackResponse struct {
	Response
}

StepBackResponse: Response to 'stepBack' request. This is just an acknowledgement, so no body field is required.

func (*StepBackResponse) GetResponse added in v0.3.0

func (r *StepBackResponse) GetResponse() *Response

type StepInArguments

type StepInArguments struct {
	ThreadId    int                 `json:"threadId"`
	TargetId    int                 `json:"targetId,omitempty"`
	Granularity SteppingGranularity `json:"granularity,omitempty"`
}

StepInArguments: Arguments for 'stepIn' request.

type StepInRequest

type StepInRequest struct {
	Request

	Arguments StepInArguments `json:"arguments"`
}

StepInRequest: The request starts the debuggee to step into a function/method if possible. If it cannot step into a target, 'stepIn' behaves like 'next'. The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed. If there are multiple function/method calls (or other targets) on the source line, the optional argument 'targetId' can be used to control into which target the 'stepIn' should occur. The list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.

func (*StepInRequest) GetRequest added in v0.3.0

func (r *StepInRequest) GetRequest() *Request

type StepInResponse

type StepInResponse struct {
	Response
}

StepInResponse: Response to 'stepIn' request. This is just an acknowledgement, so no body field is required.

func (*StepInResponse) GetResponse added in v0.3.0

func (r *StepInResponse) GetResponse() *Response

type StepInTarget

type StepInTarget struct {
	Id    int    `json:"id"`
	Label string `json:"label"`
}

StepInTarget: A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.

type StepInTargetsArguments

type StepInTargetsArguments struct {
	FrameId int `json:"frameId"`
}

StepInTargetsArguments: Arguments for 'stepInTargets' request.

type StepInTargetsRequest

type StepInTargetsRequest struct {
	Request

	Arguments StepInTargetsArguments `json:"arguments"`
}

StepInTargetsRequest: This request retrieves the possible stepIn targets for the specified stack frame. These targets can be used in the 'stepIn' request. The StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true. Clients should only call this request if the capability 'supportsStepInTargetsRequest' is true.

func (*StepInTargetsRequest) GetRequest added in v0.3.0

func (r *StepInTargetsRequest) GetRequest() *Request

type StepInTargetsResponse

type StepInTargetsResponse struct {
	Response

	Body StepInTargetsResponseBody `json:"body"`
}

StepInTargetsResponse: Response to 'stepInTargets' request.

func (*StepInTargetsResponse) GetResponse added in v0.3.0

func (r *StepInTargetsResponse) GetResponse() *Response

type StepInTargetsResponseBody

type StepInTargetsResponseBody struct {
	Targets []StepInTarget `json:"targets"`
}

type StepOutArguments

type StepOutArguments struct {
	ThreadId    int                 `json:"threadId"`
	Granularity SteppingGranularity `json:"granularity,omitempty"`
}

StepOutArguments: Arguments for 'stepOut' request.

type StepOutRequest

type StepOutRequest struct {
	Request

	Arguments StepOutArguments `json:"arguments"`
}

StepOutRequest: The request starts the debuggee to run again for one step. The debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.

func (*StepOutRequest) GetRequest added in v0.3.0

func (r *StepOutRequest) GetRequest() *Request

type StepOutResponse

type StepOutResponse struct {
	Response
}

StepOutResponse: Response to 'stepOut' request. This is just an acknowledgement, so no body field is required.

func (*StepOutResponse) GetResponse added in v0.3.0

func (r *StepOutResponse) GetResponse() *Response

type SteppingGranularity added in v0.3.0

type SteppingGranularity string

SteppingGranularity: The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.

type StoppedEvent

type StoppedEvent struct {
	Event

	Body StoppedEventBody `json:"body"`
}

StoppedEvent: The event indicates that the execution of the debuggee has stopped due to some condition. This can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.

func (*StoppedEvent) GetEvent added in v0.3.0

func (e *StoppedEvent) GetEvent() *Event

type StoppedEventBody

type StoppedEventBody struct {
	Reason            string `json:"reason"`
	Description       string `json:"description,omitempty"`
	ThreadId          int    `json:"threadId,omitempty"`
	PreserveFocusHint bool   `json:"preserveFocusHint,omitempty"`
	Text              string `json:"text,omitempty"`
	AllThreadsStopped bool   `json:"allThreadsStopped,omitempty"`
	HitBreakpointIds  []int  `json:"hitBreakpointIds,omitempty"`
}

type TerminateArguments

type TerminateArguments struct {
	Restart bool `json:"restart,omitempty"`
}

TerminateArguments: Arguments for 'terminate' request.

type TerminateRequest

type TerminateRequest struct {
	Request

	Arguments TerminateArguments `json:"arguments,omitempty"`
}

TerminateRequest: The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself. Clients should only call this request if the capability 'supportsTerminateRequest' is true.

func (*TerminateRequest) GetRequest added in v0.3.0

func (r *TerminateRequest) GetRequest() *Request

type TerminateResponse

type TerminateResponse struct {
	Response
}

TerminateResponse: Response to 'terminate' request. This is just an acknowledgement, so no body field is required.

func (*TerminateResponse) GetResponse added in v0.3.0

func (r *TerminateResponse) GetResponse() *Response

type TerminateThreadsArguments

type TerminateThreadsArguments struct {
	ThreadIds []int `json:"threadIds,omitempty"`
}

TerminateThreadsArguments: Arguments for 'terminateThreads' request.

type TerminateThreadsRequest

type TerminateThreadsRequest struct {
	Request

	Arguments TerminateThreadsArguments `json:"arguments"`
}

TerminateThreadsRequest: The request terminates the threads with the given ids. Clients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.

func (*TerminateThreadsRequest) GetRequest added in v0.3.0

func (r *TerminateThreadsRequest) GetRequest() *Request

type TerminateThreadsResponse

type TerminateThreadsResponse struct {
	Response
}

TerminateThreadsResponse: Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required.

func (*TerminateThreadsResponse) GetResponse added in v0.3.0

func (r *TerminateThreadsResponse) GetResponse() *Response

type TerminatedEvent

type TerminatedEvent struct {
	Event

	Body TerminatedEventBody `json:"body,omitempty"`
}

TerminatedEvent: The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.

func (*TerminatedEvent) GetEvent added in v0.3.0

func (e *TerminatedEvent) GetEvent() *Event

type TerminatedEventBody

type TerminatedEventBody struct {
	Restart interface{} `json:"restart,omitempty"`
}

type Thread

type Thread struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

Thread: A Thread

type ThreadEvent

type ThreadEvent struct {
	Event

	Body ThreadEventBody `json:"body"`
}

ThreadEvent: The event indicates that a thread has started or exited.

func (*ThreadEvent) GetEvent added in v0.3.0

func (e *ThreadEvent) GetEvent() *Event

type ThreadEventBody

type ThreadEventBody struct {
	Reason   string `json:"reason"`
	ThreadId int    `json:"threadId"`
}

type ThreadsRequest

type ThreadsRequest struct {
	Request
}

ThreadsRequest: The request retrieves a list of all threads.

func (*ThreadsRequest) GetRequest added in v0.3.0

func (r *ThreadsRequest) GetRequest() *Request

type ThreadsResponse

type ThreadsResponse struct {
	Response

	Body ThreadsResponseBody `json:"body"`
}

ThreadsResponse: Response to 'threads' request.

func (*ThreadsResponse) GetResponse added in v0.3.0

func (r *ThreadsResponse) GetResponse() *Response

type ThreadsResponseBody

type ThreadsResponseBody struct {
	Threads []Thread `json:"threads"`
}

type ValueFormat

type ValueFormat struct {
	Hex bool `json:"hex,omitempty"`
}

ValueFormat: Provides formatting information for a value.

type Variable

type Variable struct {
	Name               string                   `json:"name"`
	Value              string                   `json:"value"`
	Type               string                   `json:"type,omitempty"`
	PresentationHint   VariablePresentationHint `json:"presentationHint,omitempty"`
	EvaluateName       string                   `json:"evaluateName,omitempty"`
	VariablesReference int                      `json:"variablesReference"`
	NamedVariables     int                      `json:"namedVariables,omitempty"`
	IndexedVariables   int                      `json:"indexedVariables,omitempty"`
	MemoryReference    string                   `json:"memoryReference,omitempty"`
}

Variable: A Variable is a name/value pair. Optionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name. An optional 'kind' 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 the VariablesRequest. If the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes. The client can use this optional information to present the children in a paged UI and fetch them in chunks.

type VariablePresentationHint

type VariablePresentationHint struct {
	Kind       string   `json:"kind,omitempty"`
	Attributes []string `json:"attributes,omitempty"`
	Visibility string   `json:"visibility,omitempty"`
}

VariablePresentationHint: Optional properties of a variable that can be used to determine how to render the variable in the UI.

type VariablesArguments

type VariablesArguments struct {
	VariablesReference int         `json:"variablesReference"`
	Filter             string      `json:"filter,omitempty"`
	Start              int         `json:"start,omitempty"`
	Count              int         `json:"count,omitempty"`
	Format             ValueFormat `json:"format,omitempty"`
}

VariablesArguments: Arguments for 'variables' request.

type VariablesRequest

type VariablesRequest struct {
	Request

	Arguments VariablesArguments `json:"arguments"`
}

VariablesRequest: Retrieves all child variables for the given variable reference. An optional filter can be used to limit the fetched children to either named or indexed children.

func (*VariablesRequest) GetRequest added in v0.3.0

func (r *VariablesRequest) GetRequest() *Request

type VariablesResponse

type VariablesResponse struct {
	Response

	Body VariablesResponseBody `json:"body"`
}

VariablesResponse: Response to 'variables' request.

func (*VariablesResponse) GetResponse added in v0.3.0

func (r *VariablesResponse) GetResponse() *Response

type VariablesResponseBody

type VariablesResponseBody struct {
	Variables []Variable `json:"variables"`
}

type WriteMemoryArguments added in v0.6.0

type WriteMemoryArguments struct {
	MemoryReference string `json:"memoryReference"`
	Offset          int    `json:"offset,omitempty"`
	AllowPartial    bool   `json:"allowPartial,omitempty"`
	Data            string `json:"data"`
}

WriteMemoryArguments: Arguments for 'writeMemory' request.

type WriteMemoryRequest added in v0.6.0

type WriteMemoryRequest struct {
	Request

	Arguments WriteMemoryArguments `json:"arguments"`
}

WriteMemoryRequest: Writes bytes to memory at the provided location. Clients should only call this request if the capability 'supportsWriteMemoryRequest' is true.

func (*WriteMemoryRequest) GetRequest added in v0.6.0

func (r *WriteMemoryRequest) GetRequest() *Request

type WriteMemoryResponse added in v0.6.0

type WriteMemoryResponse struct {
	Response

	Body WriteMemoryResponseBody `json:"body,omitempty"`
}

WriteMemoryResponse: Response to 'writeMemory' request.

func (*WriteMemoryResponse) GetResponse added in v0.6.0

func (r *WriteMemoryResponse) GetResponse() *Response

type WriteMemoryResponseBody added in v0.6.0

type WriteMemoryResponseBody struct {
	Offset       int `json:"offset,omitempty"`
	BytesWritten int `json:"bytesWritten,omitempty"`
}

Directories

Path Synopsis
cmd
gentypes
gentypes generates Go types from debugProtocol.json Usage: $ gentypes <path to debugProtocol.json>
gentypes generates Go types from debugProtocol.json Usage: $ gentypes <path to debugProtocol.json>

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL