dap-0.3.0.0: A debug adaptor protocol library
Copyright(C) 2023 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

DAP.Server

Description

 
Synopsis

Documentation

runDAPServer :: ServerConfig -> (Command -> Adaptor app Request ()) -> IO () Source #

Simpler version of runDAPServerWithLogger.

If you don't need a custom logger or to observe reverse request responses.

runDAPServerWithLogger Source #

Arguments

:: LogAction IO DAPLog 
-> ServerConfig

Top-level Server configuration, global across all debug sessions

-> (Command -> Adaptor app Request ())

A function to facilitate communication between DAP clients, debug adaptors and debuggers

-> (ReverseRequestResponse -> Adaptor app () ())

A function to receive reverse-request-responses from DAP clients

-> IO () 

readPayload :: FromJSON json => Handle -> IO (Either String json) Source #

Helper function to parse a ProtocolMessage, extracting it's body. used for testing.

data TerminateServer Source #

An exception to throw if you want to stop the server execution from a client. This is useful if you launch a new server per debugging session and want to terminate it at the end.

Constructors

TerminateServer