dapserver

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package dapserver implements a DAP (Debug Adapter Protocol) server for the ELPS debugger engine. It translates between the DAP wire protocol and the debugger.Engine interface.

The server supports two transport modes:

  • TCP: Primary mode for embedded/attached debugging. The server listens on a TCP port and accepts a single client connection.
  • Stdio: For CLI use (e.g., "elps debug --stdio"). The server reads from stdin and writes to stdout, as expected by editors like VS Code when launching a debug adapter as a child process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a DAP protocol server that wraps a debugger Engine.

func New

func New(engine *debugger.Engine) *Server

New creates a new DAP server wrapping the given debugger engine.

func (*Server) ServeConn

func (s *Server) ServeConn(conn io.ReadWriteCloser) error

ServeConn serves DAP messages on a single connection. It blocks until the connection is closed or a disconnect request is received.

func (*Server) ServeListener

func (s *Server) ServeListener(ln net.Listener) error

ServeListener accepts a single connection from the listener and serves DAP messages on it.

func (*Server) ServeStdio

func (s *Server) ServeStdio(r io.Reader, w io.Writer) error

ServeStdio serves DAP messages on the given reader and writer, typically os.Stdin and os.Stdout.

func (*Server) ServeTCP

func (s *Server) ServeTCP(addr string) error

ServeTCP listens on the given address and serves a single DAP client. It blocks until the client disconnects.

Jump to

Keyboard shortcuts

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