haskell-debugger
Safe HaskellNone
LanguageGHC2021

GHC.Debugger.Interface.Messages

Description

Types for sending and receiving messages to/from haskell-debugger

Synopsis

Documentation

newtype AbsFilePath Source #

See Note [Paths should be made absolute at the source]

Constructors

MkAbsFilePath 

Fields

Instances

Instances details
Eq AbsFilePath Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

Show AbsFilePath Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

data Command Source #

The commands sent to the debugger

Constructors

SetBreakpoint

Set a breakpoint on a given function, or module by line number

Fields

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 setBreakpoints re-sets all breakpoints from zero for a source rather than incrementally.

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 EntryPoint is Main, runArgs are set as process invocation arguments (as in argv) rather than passed directly as a Haskell function arguments.

data EntryPoint Source #

An entry point for program execution.

Constructors

MainEntry 

Fields

FunctionEntry 

Fields

Instances

Instances details
Show EntryPoint Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

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

Instances details
Show Breakpoint Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

data ScopeInfo Source #

Information about a scope

Instances

Instances details
Show ScopeInfo Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

newtype VarFields Source #

Constructors

VarFields [VarInfo] 

data VarInfo Source #

Information about a variable

Constructors

VarInfo 

Fields

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.

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

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 

Fields

Instances

Instances details
Eq SourceSpan Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

Show SourceSpan Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

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]

data BreakFound Source #

Constructors

BreakFound 

Fields

BreakFoundNoLoc

Breakpoint found but without location info. This happens when setting breakpoints on exceptions.

Fields

  • changed :: Bool

    Did the status of the found breakpoint change?

BreakNotFound

No breakpoints found

ManyBreaksFound [BreakFound]

Found many breakpoints. Caused by setting breakpoint on a name with multiple matches or many equations.

Instances

Instances details
Show BreakFound Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

newtype RemoteThreadId Source #

A reference to a remote thread by remote id See getRemoteThreadId.

Constructors

RemoteThreadId 

Fields

  • remoteThreadIntRef :: Int

    The number identifier of the thread on the (remote) interpreter. To find the proper remote ThreadId corresponding to this numeric identifier, lookup the remoteThreadIntRef in the ThreadMap

data SourceKind Source #

Constructors

IsExpr 
IsStmt 

data EvalResult Source #

Constructors

EvalCompleted 

Fields

EvalException 
EvalStopped 

Fields

EvalAbortedWith String

Evaluation failed for some reason other than completedcompleted-with-exceptionstopped.

data DebuggeeThread Source #

Constructors

DebuggeeThread 

Fields

Instances

Instances details
Show DebuggeeThread Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

data DbgStackFrameBCOArgs (ref :: Type -> Type) Source #

Constructors

DbgStackFrameBCOArgs 

Fields

Instances

Instances details
Generic (DbgStackFrameBCOArgs ref) Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

Associated Types

type Rep (DbgStackFrameBCOArgs ref) 
Instance details

Defined in GHC.Debugger.Interface.Messages

type Rep (DbgStackFrameBCOArgs ref) = D1 ('MetaData "DbgStackFrameBCOArgs" "GHC.Debugger.Interface.Messages" "haskell-debugger-0.13.2.0-inplace" 'False) (C1 ('MetaCons "DbgStackFrameBCOArgs" 'PrefixI 'True) (S1 ('MetaSel ('Just "bcoArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NoShow (ref [StackField]))) :*: S1 ('MetaSel ('Just "bcoArgsOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word))))
Show (DbgStackFrameBCOArgs ref) Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

type Rep (DbgStackFrameBCOArgs ref) Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

type Rep (DbgStackFrameBCOArgs ref) = D1 ('MetaData "DbgStackFrameBCOArgs" "GHC.Debugger.Interface.Messages" "haskell-debugger-0.13.2.0-inplace" 'False) (C1 ('MetaCons "DbgStackFrameBCOArgs" 'PrefixI 'True) (S1 ('MetaSel ('Just "bcoArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NoShow (ref [StackField]))) :*: S1 ('MetaSel ('Just "bcoArgsOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Word))))

data DbgStackFrame Source #

Constructors

DbgStackFrame 

Fields

Instances

Instances details
Show DbgStackFrame Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

newtype NoShow a Source #

Constructors

NoShow a 

Instances

Instances details
Show (NoShow a) Source # 
Instance details

Defined in GHC.Debugger.Interface.Messages

Methods

showsPrec :: Int -> NoShow a -> ShowS #

show :: NoShow a -> String #

showList :: [NoShow a] -> ShowS #

Orphan instances