| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.Debugger.Interface.Messages
Contents
Description
Types for sending and receiving messages to/from haskell-debugger
Synopsis
- newtype AbsFilePath = MkAbsFilePath {}
- mkAbsolute :: FilePath -> AbsFilePath
- (/>) :: AbsFilePath -> FilePath -> AbsFilePath
- data Command
- = SetBreakpoint { }
- | DelBreakpoint Breakpoint
- | GetBreakpointsAt Breakpoint
- | ClearModBreakpoints {
- file :: AbsFilePath
- | ClearFunctionBreakpoints
- | GetThreads
- | GetStacktrace RemoteThreadId
- | GetScopes RemoteThreadId Int
- | GetVariables RemoteThreadId Int VariableReference
- | DoEval String
- | GetExceptionInfo RemoteThreadId
- | DoContinue
- | DoStepLocal
- | DoSingleStep
- | DoStepOut
- | DebugExecution {
- entryPoint :: EntryPoint
- entryFile :: AbsFilePath
- runArgs :: [String]
- data EntryPoint
- data Breakpoint
- data ScopeInfo = ScopeInfo {}
- newtype VarFields = VarFields [VarInfo]
- data VarInfo = VarInfo {}
- data VariableResult
- variableResultToList :: VariableResult -> [VarInfo]
- data BreakpointKind
- data ScopeVariablesReference
- data VariableReference
- scopeToVarRef :: ScopeVariablesReference -> VariableReference
- data SourceSpan = SourceSpan {}
- unhelpfulSourceSpan :: SourceSpan
- srcLocToSourceSpan :: AbsFilePath -> SrcLoc -> SourceSpan
- data Response
- = DidEval EvalResult
- | DidSetBreakpoint BreakFound
- | DidRemoveBreakpoint BreakFound
- | DidGetBreakpoints (Maybe SourceSpan)
- | DidClearBreakpoints
- | DidContinue EvalResult
- | DidStep EvalResult
- | DidExec EvalResult
- | GotThreads [DebuggeeThread]
- | GotStacktrace [DbgStackFrame]
- | GotScopes [ScopeInfo]
- | GotVariables VariableResult
- | GotExceptionInfo ExceptionInfo
- | Aborted String
- | NonFatalError String
- | Initialised
- data BreakFound
- = BreakFound {
- changed :: !Bool
- breakId :: [InternalBreakpointId]
- sourceSpan :: SourceSpan
- | BreakFoundNoLoc { }
- | BreakNotFound
- | ManyBreaksFound [BreakFound]
- = BreakFound {
- newtype RemoteThreadId = RemoteThreadId {}
- data SourceKind
- data EvalResult
- = EvalCompleted { }
- | EvalException {
- resultVal :: String
- resultType :: String
- | EvalStopped { }
- | EvalAbortedWith String
- data DebuggeeThread = DebuggeeThread {
- tId :: !RemoteThreadId
- tName :: !(Maybe String)
- data DbgStackFrameBCOArgs (ref :: Type -> Type) = DbgStackFrameBCOArgs {
- bcoArgs :: NoShow (ref [StackField])
- bcoArgsOffset :: Maybe Word
- data DbgStackFrame = DbgStackFrame {}
- data ExceptionInfo = ExceptionInfo {}
- newtype NoShow a = NoShow a
Documentation
newtype AbsFilePath Source #
See Note [Paths should be made absolute at the source]
Constructors
| MkAbsFilePath | |
Instances
| Eq AbsFilePath Source # | |
Defined in GHC.Debugger.Interface.Messages | |
| Show AbsFilePath Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> AbsFilePath -> ShowS # show :: AbsFilePath -> String # showList :: [AbsFilePath] -> ShowS # | |
mkAbsolute :: FilePath -> AbsFilePath Source #
(/>) :: AbsFilePath -> FilePath -> AbsFilePath Source #
The commands sent to the debugger
Constructors
| SetBreakpoint | Set a breakpoint on a given function, or module by line number |
| DelBreakpoint Breakpoint | Delete a breakpoint on a given function, or module by line number |
| GetBreakpointsAt Breakpoint | Find the valid breakpoints locations for the given module Breakpoint |
| ClearModBreakpoints | Clear all breakpoints in the specified file.
This is useful because DAP's |
Fields
| |
| ClearFunctionBreakpoints | Clear all function breakpoints |
| GetThreads | Get all threads |
| GetStacktrace RemoteThreadId | Get the evaluation stacktrace until the current breakpoint. |
| GetScopes RemoteThreadId Int | Get the list of available scopes at the current breakpoint |
| GetVariables RemoteThreadId Int VariableReference | Get the variables in scope for the current breakpoint. Note: for GHCs <9.16 this only reports the variables free in the expression we're stopped at rather than all variables in scope. |
| DoEval String | Evaluate an expression at the current breakpoint. |
| GetExceptionInfo RemoteThreadId | Get information about the current exception (if any) on a thread. |
| DoContinue | Continue executing from the current breakpoint |
| DoStepLocal | Step local, which executes until next breakpoint in the same function. |
| DoSingleStep | Single step always to the next breakpoint. Used for "step-in". |
| DoStepOut | Step out to the breakpoint immediately following a return. |
| DebugExecution | Execute a prog with debugging enabled. Breaks on the existing breakpoints. Constructed with an entry point function name and the arguments to pass it. When the |
Fields
| |
data EntryPoint Source #
An entry point for program execution.
Instances
| Show EntryPoint Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> EntryPoint -> ShowS # show :: EntryPoint -> String # showList :: [EntryPoint] -> ShowS # | |
data Breakpoint Source #
A breakpoint can be set/removed on functions by name, or in modules by line number. And, globally, for all exceptions, or just uncaught exceptions.
Instances
| Show Breakpoint Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> Breakpoint -> ShowS # show :: Breakpoint -> String # showList :: [Breakpoint] -> ShowS # | |
Information about a scope
Constructors
| ScopeInfo | |
Fields
| |
Information about a variable
data VariableResult Source #
Result of requesting variables.
If the variable you requested is a thunk then ForcedVariable is returned, which
is the variable you requested but forced.
If the variable you requested is not a thunk, then VariableFields is returned which
contains the subfields of the variable.
Constructors
| ForcedVariable VarInfo | |
| VariableFields [VarInfo] |
variableResultToList :: VariableResult -> [VarInfo] Source #
data BreakpointKind Source #
What kind of breakpoint are we referring to, module or function breakpoints?
Used e.g. in the ClearBreakpoints request
Constructors
| ModuleBreakpointKind | Module breakpoints |
| FunctionBreakpointKind | Function breakpoints |
Instances
| Outputable BreakpointKind Source # | |
Defined in GHC.Debugger.Interface.Messages Methods ppr :: BreakpointKind -> SDoc # | |
| Eq BreakpointKind Source # | |
Defined in GHC.Debugger.Interface.Messages Methods (==) :: BreakpointKind -> BreakpointKind -> Bool # (/=) :: BreakpointKind -> BreakpointKind -> Bool # | |
| Show BreakpointKind Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> BreakpointKind -> ShowS # show :: BreakpointKind -> String # showList :: [BreakpointKind] -> ShowS # | |
data ScopeVariablesReference Source #
Referring to existing scopes
Instances
data VariableReference Source #
The type of variables referenced, or a particular variable referenced for its fields or value (when inspecting a thunk)
Constructors
| NoVariables | A void reference to nothing at all. Used e.g. for ty cons and data cons |
| LocalVariables | Variables in the local context (includes arguments, previous bindings) |
| ModuleVariables | Variables in the module where we're stopped |
| GlobalVariables | Variables in the global context |
| SpecificVariable TermKey | A reference to a specific variable. Used to force its result or get its structured children |
data SourceSpan Source #
A source span type for the interface. Like RealSrcSpan.
Constructors
| SourceSpan | |
Instances
| Eq SourceSpan Source # | |
Defined in GHC.Debugger.Interface.Messages | |
| Show SourceSpan Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> SourceSpan -> ShowS # show :: SourceSpan -> String # showList :: [SourceSpan] -> ShowS # | |
unhelpfulSourceSpan :: SourceSpan Source #
This is a completely unhelpful source span! It doesn't point to anything and is of no help to the user whatsoever.
Use this only as a last resort if no other source span can be provided.
srcLocToSourceSpan :: AbsFilePath -> SrcLoc -> SourceSpan Source #
See Note [Paths should be made absolute at the source]
The responses sent by `haskell-debugger` to the client
Constructors
data BreakFound Source #
Constructors
| BreakFound | |
Fields
| |
| BreakFoundNoLoc | Breakpoint found but without location info. This happens when setting breakpoints on exceptions. |
| BreakNotFound | No breakpoints found |
| ManyBreaksFound [BreakFound] | Found many breakpoints. Caused by setting breakpoint on a name with multiple matches or many equations. |
Instances
| Show BreakFound Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> BreakFound -> ShowS # show :: BreakFound -> String # showList :: [BreakFound] -> ShowS # | |
newtype RemoteThreadId Source #
A reference to a remote thread by remote id
See getRemoteThreadId.
Constructors
| RemoteThreadId | |
Fields
| |
Instances
data SourceKind Source #
data EvalResult Source #
Constructors
| EvalCompleted | |
Fields
| |
| EvalException | |
Fields
| |
| EvalStopped | |
Fields
| |
| EvalAbortedWith String | Evaluation failed for some reason other than completedcompleted-with-exceptionstopped. |
data DebuggeeThread Source #
Constructors
| DebuggeeThread | |
Fields
| |
Instances
| Show DebuggeeThread Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> DebuggeeThread -> ShowS # show :: DebuggeeThread -> String # showList :: [DebuggeeThread] -> ShowS # | |
data DbgStackFrameBCOArgs (ref :: Type -> Type) Source #
Constructors
| DbgStackFrameBCOArgs | |
Fields
| |
Instances
data DbgStackFrame Source #
Constructors
| DbgStackFrame | |
Fields
| |
Instances
| Show DbgStackFrame Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> DbgStackFrame -> ShowS # show :: DbgStackFrame -> String # showList :: [DbgStackFrame] -> ShowS # | |
data ExceptionInfo Source #
Constructors
| ExceptionInfo | |
Instances
| Show ExceptionInfo Source # | |
Defined in GHC.Debugger.Interface.Messages Methods showsPrec :: Int -> ExceptionInfo -> ShowS # show :: ExceptionInfo -> String # showList :: [ExceptionInfo] -> ShowS # | |
Constructors
| NoShow a |
Orphan instances
| Show InternalBreakpointId Source # | |
Methods showsPrec :: Int -> InternalBreakpointId -> ShowS # show :: InternalBreakpointId -> String # showList :: [InternalBreakpointId] -> ShowS # | |