haskell-debugger
Safe HaskellNone
LanguageGHC2021

GHC.Debugger.Breakpoint

Synopsis

Breakpoints

clearBreakpoints :: Maybe AbsFilePath -> Debugger () Source #

Remove all module breakpoints set on the given loaded module by path

If the argument is Nothing, clear all function breakpoints instead.

Lower-level interface

registerBreakpoint :: BreakpointId -> BreakpointInfo -> Debugger (Bool, [InternalBreakpointId]) Source #

Registers or deletes a breakpoint in the GHC session and from the list of active breakpoints that is kept in DebuggerState, depending on the BreakpointStatus being set.

Returns True when the breakpoint status is changed.

getActiveBreakpoints :: Maybe AbsFilePath -> Debugger [InternalBreakpointId] Source #

Get a list with all currently active breakpoints on the given module (by path)

If the path argument is Nothing, get all active function breakpoints instead

breakpointStatusInt :: BreakpointStatus -> Int Source #

Turn a BreakpointStatus into its Int representation for BreakArray

getInternalBreaksOf :: BreakpointId -> Debugger [InternalBreakpointId] Source #

Find all the internal breakpoints that use the given source-level breakpoint id

Utils

condBreakEnableStatus Source #

Arguments

:: Maybe Int

hitCount

-> Maybe String

condition

-> BreakpointStatus 

Turn a hitCount :: Maybe Int and condition :: Maybe Text into an enabled BreakpointStatus.

logMessageExpression :: String -> String Source #

logMessageExpression "foo = {show foo}" = "putStrLn (concat ["foo = ", show foo])"

Braces are preserved if escaped with a backslash. Some unescaped braces are fine: opening braces in antiquotations and closing braces outside of them.

data StringPart Source #

Instances

Instances details
Show StringPart Source # 
Instance details

Defined in GHC.Debugger.Breakpoint

findBreakpoint Source #

Arguments

:: Module

module

-> Int

line num

-> Maybe Int

column num

-> Debugger (Maybe (Int, RealSrcSpan)) 

Find a BreakpointId index and its span from a module + line + column.

Used by setBreakpoints and GetBreakpointsAt requests