| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
GHC.Debugger.Breakpoint
Synopsis
- clearBreakpoints :: Maybe AbsFilePath -> Debugger ()
- getBreakpointsAt :: Breakpoint -> Debugger (Maybe SourceSpan)
- setBreakpoint :: Breakpoint -> BreakpointStatus -> BreakpointAction -> Debugger BreakFound
- registerBreakpoint :: BreakpointId -> BreakpointInfo -> Debugger (Bool, [InternalBreakpointId])
- getActiveBreakpoints :: Maybe AbsFilePath -> Debugger [InternalBreakpointId]
- breakpointStatusInt :: BreakpointStatus -> Int
- getInternalBreaksOf :: BreakpointId -> Debugger [InternalBreakpointId]
- condBreakEnableStatus :: Maybe Int -> Maybe String -> BreakpointStatus
- logMessageExpression :: String -> String
- data StringPart
- unQC :: String -> String -> [StringPart]
- parseQC :: String -> String -> [StringPart]
- getModuleByPath :: AbsFilePath -> Debugger (Either SDoc ModuleNodeInfo)
- findBreakpoint :: Module -> Int -> Maybe Int -> Debugger (Maybe (Int, RealSrcSpan))
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.
getBreakpointsAt :: Breakpoint -> Debugger (Maybe SourceSpan) Source #
setBreakpoint :: Breakpoint -> BreakpointStatus -> BreakpointAction -> Debugger BreakFound Source #
Set a breakpoint in this session
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
| Show StringPart Source # | |
Defined in GHC.Debugger.Breakpoint Methods showsPrec :: Int -> StringPart -> ShowS # show :: StringPart -> String # showList :: [StringPart] -> ShowS # | |
getModuleByPath :: AbsFilePath -> Debugger (Either SDoc ModuleNodeInfo) Source #
Get a ModSummary of a loaded module given its FilePath
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