Safe Haskell | None |
---|---|
Language | Haskell2010 |
Debug.DebugTrace
Description
Module for recording and manipulating debug traces. For most users, the
TemplateHaskell
helpers in Debug should be sufficient.
- data DebugTrace = DebugTrace {}
- data Function = Function {}
- data CallData = CallData {
- callFunctionId :: Int
- callVals :: [(Text, Int)]
- callDepends :: [Int]
- callParents :: [Int]
- debugPrintTrace :: DebugTrace -> IO ()
- debugJSONTrace :: DebugTrace -> ByteString
- debugViewTrace :: DebugTrace -> IO ()
- debugSaveTrace :: FilePath -> DebugTrace -> IO ()
- getTraceVars :: DebugTrace -> [(Function, [(Text, Text)])]
Debug traces
Metadata about a function, used to drive the HTML view.
Constructors
Function | |
A flat encoding of an observed call.
Constructors
CallData | |
Fields
|
Viewing the trace
debugPrintTrace :: DebugTrace -> IO () Source #
Print information about the observed function calls to stdout
,
in a human-readable format.
debugJSONTrace :: DebugTrace -> ByteString Source #
Obtain information about observed functions in JSON format. The JSON format is not considered a stable part of the interface, more presented as a back door to allow exploration of alternative views.
debugViewTrace :: DebugTrace -> IO () Source #
Open a web browser showing information about observed functions.
debugSaveTrace :: FilePath -> DebugTrace -> IO () Source #
Save information about observed functions to the specified file, in HTML format.
getTraceVars :: DebugTrace -> [(Function, [(Text, Text)])] Source #
Along with the function metatdata, get a list of the variable names and string values from the trace