| Copyright | (C) 2023 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
DAP.Server
Description
Synopsis
- runDAPServer :: ServerConfig -> (Command -> Adaptor app Request ()) -> IO ()
- runDAPServerWithLogger :: LogAction IO DAPLog -> ServerConfig -> (Command -> Adaptor app Request ()) -> (ReverseRequestResponse -> Adaptor app () ()) -> IO ()
- readPayload :: FromJSON json => Handle -> IO (Either String json)
- data TerminateServer = TerminateServer
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 |
Instances
| Exception TerminateServer Source # | |
Defined in DAP.Server Methods toException :: TerminateServer -> SomeException # | |
| Show TerminateServer Source # | |
Defined in DAP.Server Methods showsPrec :: Int -> TerminateServer -> ShowS # show :: TerminateServer -> String # showList :: [TerminateServer] -> ShowS # | |