package debugger
Import Path
/tools/debugger (on go.dev)
Dependency Relation
imports 56 packages, and imported by 3 packages
Involved Source Files
client_list.go
dbg_handlers.go
Package debugger provides a TUI debugger with multi-client support. Runnable
command can be found in tools/cmd/am-dbg.
diagrams.go
keyboard.go
log.go
misc_dbg.go
themes.go
tree.go
ui.go
utils.go
Package-Level Type Names (total 7)
Client *server.Client
Client.ConnId string
Client.Connected atomic.Bool
indexes of txs with errors, desc order for bisects
TOOD refresh on GC
bits which get saved into the go file
TODO refac to MsgSchema
TODO version schemas
Client.Exportable.MsgTxs []*dbg.DbgMsgTx
Client.Exportable.Version string
Client.Id string
cache of processed log entries
Client.MTimeSum uint64
Client.MsgSchemaParsed *types.MsgSchemaParsed
processed list of filtered tx _indexes_
processed
Client.SchemaHash string
Client.SelectedGroup string
CursorStep1 int
CursorTx1 int
extracted log entries per tx ID
TODO GC when all entries are closedAt and the first client's tx is later
than the latest closedAt; whole tx needs to be disposed at the same time
ReaderCollapsed bool
SelectedState string
(*Client) AddReaderEntry(txId string, entry *types.LogReaderEntry) int
( Client) ClearCache()
( Client) FilterIndexByCursor1(cursor1 int) int
(*Client) GetReaderEntry(txId string, idx int) *types.LogReaderEntry
( Client) HadErrSinceTx(tx, distance int) bool
( Client) IndexesToStates(indexes []int) am.S
( Client) LastActive() time.Time
( Client) ParseSchema()
( Client) StatesToIndexes(states am.S) []int
( Client) Tx(idx int) *dbg.DbgMsgTx
( Client) TxAtHTime(hTime time.Time) int
( Client) TxAtMachTime(sum uint64) int
( Client) TxAtQueueTick(qTick uint64) int
TxExecutedBy returns the execution transition for a queued transition
TxIndex returns the index of transition ID [id] or -1 if not found.
( Client) TxParsed(idx int) *types.MsgTxParsed
func (*Debugger).Client() (*Client, error)
App *cview.Application
selected client
Clients map[string]*Client
DisposedHandlers *ssam.DisposedHandlers
ExceptionHandler *am.ExceptionHandler
Focused cview.Primitive
TODO GC removed machines
HistoryCursor int
LayoutRoot *cview.Panels
Mach *am.Machine
read-only params clone
ServerHttp *http.Server
ServerMux cmux.CMux
(*Debugger) AddressFocusedEnd(e *am.Event)
(*Debugger) AddressFocusedState(e *am.Event)
(*Debugger) AfterFocusEnter(e *am.Event) bool
(*Debugger) AfterFocusState(e *am.Event)
(*Debugger) AnyEnter(e *am.Event) bool
(*Debugger) AnyState(e *am.Event)
(*Debugger) BackEnter(e *am.Event) bool
(*Debugger) BackState(e *am.Event)
(*Debugger) BackStepEnter(e *am.Event) bool
(*Debugger) BackStepState(e *am.Event)
(*Debugger) BuildingLogState(e *am.Event)
Client returns the current Client. Thread safe via Eval().
(*Debugger) ClientListVisibleEnd(e *am.Event)
(*Debugger) ClientListVisibleState(e *am.Event)
(*Debugger) ClientMsgEnter(e *am.Event) bool
(*Debugger) ClientMsgState(e *am.Event)
(*Debugger) ClientSelectedEnd(e *am.Event)
(*Debugger) ClientSelectedState(e *am.Event)
(*Debugger) ConnectEventEnter(e *am.Event) bool
(*Debugger) ConnectEventState(e *am.Event)
CurrentTx returns the current transition. Thread safe via Eval().
(*Debugger) DiagramsGraphRenderingEnter(e *am.Event) bool
(*Debugger) DiagramsGraphRenderingState(e *am.Event)
(*Debugger) DiagramsMachReadyState(e *am.Event)
(*Debugger) DiagramsMachRenderingEnter(e *am.Event) bool
(*Debugger) DiagramsMachRenderingState(e *am.Event)
(*Debugger) DiagramsStatesRenderingEnter(e *am.Event) bool
(*Debugger) DiagramsStatesRenderingState(e *am.Event)
(*Debugger) DialogFocusedEnd(e *am.Event)
(*Debugger) DisconnectEventEnter(e *am.Event) bool
(*Debugger) DisconnectEventState(e *am.Event)
(*Debugger) Dispose()
( Debugger) DisposedState(e *am.Event)
( Debugger) DisposingState(e *am.Event)
(*Debugger) ErrGraphEnter(e *am.Event) bool
(*Debugger) ExceptionEnter(e *am.Event) bool
ExceptionState creates a log file with the error and stack trace, after
calling the super exception handler.
(*Debugger) ExportDialogEnd(e *am.Event)
(*Debugger) ExportDialogState(e *am.Event)
(*Debugger) FilterCanceledTxEnd(e *am.Event)
(*Debugger) FilterQueuedTxEnd(e *am.Event)
TODO move
TODO move
(*Debugger) FwdEnter(e *am.Event) bool
(*Debugger) FwdState(e *am.Event)
(*Debugger) FwdStepEnter(e *am.Event) bool
(*Debugger) FwdStepState(e *am.Event)
(*Debugger) GcMsgsEnter(e *am.Event) bool
(*Debugger) GcMsgsState(e *am.Event)
GoToMachAddress tries to render a view of the provided address (mach, tx).
Blocks. TODO state: GoToMachAddr, MachAddr
(*Debugger) HeartbeatState(e *am.Event)
(*Debugger) HelpDialogEnd(e *am.Event)
(*Debugger) HelpDialogState(e *am.Event)
(*Debugger) LoadingEnd(e *am.Event)
(*Debugger) LoadingExit(e *am.Event) bool
(*Debugger) LoadingState(e *am.Event)
(*Debugger) LogBuiltState(e *am.Event)
(*Debugger) LogReaderText() string
(*Debugger) LogReaderVisibleEnd(e *am.Event)
(*Debugger) LogReaderVisibleState(e *am.Event)
(*Debugger) LogUpdatedState(e *am.Event)
(*Debugger) MachAddr() *types.MachAddress
(*Debugger) MatrixRainEnter(e *am.Event) bool
(*Debugger) MatrixRainSelectedState(e *am.Event)
(*Debugger) MatrixRainState(e *am.Event)
(*Debugger) MatrixViewEnd(e *am.Event)
(*Debugger) MatrixViewState(e *am.Event)
(*Debugger) NarrowLayoutEnd(e *am.Event)
(*Debugger) NarrowLayoutExit(e *am.Event) bool
(*Debugger) NarrowLayoutState(e *am.Event)
NextTx returns the next transition. Thread safe via Eval().
(*Debugger) OverlayEnd(e *am.Event)
(*Debugger) OverlayEnter(e *am.Event) bool
(*Debugger) OverlayState(e *am.Event)
(*Debugger) PausedState(e *am.Event)
(*Debugger) PlayingEnd(e *am.Event)
(*Debugger) PlayingState(e *am.Event)
PrevTx returns the previous transition. Thread safe via Eval().
(*Debugger) ReadyEnd(e *am.Event)
(*Debugger) ReadyState(e *am.Event)
(*Debugger) RedrawState(e *am.Event)
( Debugger) RegisterDisposalEnter(e *am.Event) bool
RegisterDisposalState registers an external / dynamic disposal handler.
Machine handlers should overload DisposingState and call super instead.
(*Debugger) RemoveClientEnter(e *am.Event) bool
(*Debugger) RemoveClientState(e *am.Event)
(*Debugger) ResizedState(e *am.Event)
(*Debugger) ScrollToMutTxState(e *am.Event)
(*Debugger) ScrollToStepEnter(e *am.Event) bool
(*Debugger) ScrollToStepState(e *am.Event)
(*Debugger) ScrollToTxEnter(e *am.Event) bool
(*Debugger) ScrollToTxState(e *am.Event)
(*Debugger) SelectingClientEnter(e *am.Event) bool
(*Debugger) SelectingClientState(e *am.Event)
(*Debugger) SetCursorState(e *am.Event)
TODO state: SetOptsState
(*Debugger) SetGroupEnter(e *am.Event) bool
(*Debugger) SetGroupState(e *am.Event)
(*Debugger) SshServerEnd(e *am.Event)
(*Debugger) SshServerEnter(e *am.Event) bool
(*Debugger) SshServerState(e *am.Event)
(*Debugger) Start()
(*Debugger) StartEnd(e *am.Event)
(*Debugger) StartState(e *am.Event)
(*Debugger) StateNameSelectedEnd(e *am.Event)
(*Debugger) StateNameSelectedEnter(e *am.Event) bool
(*Debugger) StateNameSelectedState(e *am.Event)
(*Debugger) SwitchedClientTxState(e *am.Event)
(*Debugger) SwitchingClientTxState(e *am.Event)
(*Debugger) TailModeEnd(e *am.Event)
(*Debugger) TailModeState(e *am.Event)
(*Debugger) TimelineStepsFocusedEnd(e *am.Event)
(*Debugger) TimelineStepsFocusedState(e *am.Event)
(*Debugger) TimelineStepsHiddenEnd(e *am.Event)
(*Debugger) TimelineStepsHiddenState(e *am.Event)
(*Debugger) TimelineStepsScrolledEnd(e *am.Event)
(*Debugger) TimelineStepsScrolledState(e *am.Event)
(*Debugger) TimelineTxHiddenEnd(e *am.Event)
(*Debugger) TimelineTxHiddenState(e *am.Event)
(*Debugger) ToggleToolEnter(e *am.Event) bool
(*Debugger) ToggleToolState(e *am.Event)
(*Debugger) ToolRainState(e *am.Event)
(*Debugger) ToolToggledState(e *am.Event)
(*Debugger) Toolbar1FocusedEnd(e *am.Event)
(*Debugger) Toolbar1FocusedState(e *am.Event)
(*Debugger) Toolbar2FocusedEnd(e *am.Event)
(*Debugger) Toolbar2FocusedState(e *am.Event)
(*Debugger) Toolbar3FocusedEnd(e *am.Event)
(*Debugger) Toolbar3FocusedState(e *am.Event)
(*Debugger) Toolbar4FocusedEnd(e *am.Event)
(*Debugger) Toolbar4FocusedState(e *am.Event)
(*Debugger) TreeGroupsFocusedEnd(e *am.Event)
(*Debugger) TreeGroupsFocusedState(e *am.Event)
(*Debugger) TreeMatrixViewEnd(e *am.Event)
(*Debugger) TreeMatrixViewState(e *am.Event)
(*Debugger) UpdateFocusState(e *am.Event)
(*Debugger) UpdateLogScheduledState(e *am.Event)
(*Debugger) UpdatingLogState(e *am.Event)
(*Debugger) UserBackState(e *am.Event)
(*Debugger) UserBackStepState(e *am.Event)
(*Debugger) UserFwdState(e *am.Event)
(*Debugger) UserFwdStepState(e *am.Event)
(*Debugger) WebReqDiagState(e *am.Event)
(*Debugger) WebSocketDiagState(e *am.Event)
func New(ctx context.Context, p types.Params) (*Debugger, error)
func github.com/pancsta/asyncmachine-go/internal/testing.NewDbgWorker(realTty bool, p types.Params) (*Debugger, error)
Box *cview.Box
Primitive cview.Primitive
GetBackgroundColor returns the box's background color.
GetBorder returns a value indicating whether the box have a border
or not.
GetBorderPadding returns the size of the padding around the box content.
Deprecated: This function is provided for backwards compatibility.
Developers should use GetPadding instead.
GetDrawFunc returns the callback function which was installed with
SetDrawFunc() or nil if no such function has been installed.
GetInnerRect returns the position of the inner rectangle (x, y, width,
height), without the border and without any padding. Width and height values
will clamp to 0 and thus never be negative.
GetInputCapture returns the function installed with SetInputCapture() or nil
if no such function has been installed.
GetMouseCapture returns the function installed with SetMouseCapture() or nil
if no such function has been installed.
GetPadding returns the size of the padding around the box content.
GetTitle returns the box's current title.
HasFocus returns whether or not this primitive has focus.
InRect returns true if the given coordinate is within the bounds of the box's
rectangle.
SetBackgroundColor sets the box's background color.
SetBackgroundTransparent sets the flag indicating whether or not the box's
background is transparent. The screen is not cleared before drawing the
application. Overlaying transparent widgets directly onto the screen may
result in artifacts. To resolve this, add a blank, non-transparent Box to
the bottom layer of the interface via Panels, or set a handler via
SetBeforeDrawFunc which clears the screen.
SetBorder sets the flag indicating whether or not the box should have a
border.
SetBorderAttributes sets the border's style attributes. You can combine
different attributes using bitmask operations:
box.SetBorderAttributes(tcell.AttrUnderline | tcell.AttrBold)
SetBorderColor sets the box's border color.
SetBorderColorFocused sets the box's border color when the box is focused.
SetBorderPadding sets the size of the padding around the box content.
Deprecated: This function is provided for backwards compatibility.
Developers should use SetPadding instead.
SetDrawFunc sets a callback function which is invoked after the box primitive
has been drawn. This allows you to add a more individual style to the box
(and all primitives which extend it).
The function is provided with the box's dimensions (set via SetRect()). It
must return the box's inner dimensions (x, y, width, height) which will be
returned by GetInnerRect(), used by descendent primitives to draw their own
content.
SetInputCapture installs a function which captures key events before they are
forwarded to the primitive's default key event handler. This function can
then choose to forward that key event (or a different one) to the default
handler by returning it. If nil is returned, the default handler will not
be called.
Providing a nil handler will remove a previously existing handler.
Note that this function will not have an effect on primitives composed of
other primitives, such as Form, Flex, or Grid. Key events are only captured
by the primitives that have focus (e.g. InputField) and only one primitive
can have focus at a time. Composing primitives such as Form pass the focus on
to their contained primitives and thus never receive any key events
themselves. Therefore, they cannot intercept key events.
SetMouseCapture sets a function which captures mouse events (consisting of
the original tcell mouse event and the semantic mouse action) before they are
forwarded to the primitive's default mouse event handler. This function can
then choose to forward that event (or a different one) by returning it or
returning a nil mouse event, in which case the default handler will not be
called.
Providing a nil handler will remove a previously existing handler.
SetPadding sets the size of the padding around the box content.
SetTitle sets the box's title.
SetTitleAlign sets the alignment of the title, one of AlignLeft, AlignCenter,
or AlignRight.
SetTitleColor sets the box's title color.
ShowFocus sets the flag indicating whether or not the borders of this
primitive should change thickness when focused.
WrapInputHandler wraps an input handler (see InputHandler()) with the
functionality to capture input (see SetInputCapture()) before passing it
on to the provided (default) input handler.
This is only meant to be used by subclassing primitives.
WrapMouseHandler wraps a mouse event handler (see MouseHandler()) with the
functionality to capture mouse events (see SetMouseCapture()) before passing
them on to the provided (default) event handler.
This is only meant to be used by subclassing primitives.
Focusable : github.com/pancsta/cview.Focusable
type RelCol (struct)
TODO move to types
primary active/selected state color
secondary active color (changed states)
contrast background color
more contrast background color
primitive background color
border color
contrast primary text color
contrast secondary text color
faded/extern content
error color
error background color (accepted tx with exception state)
recent error indicator
primary text color
secondary text color
graphics color
accepted gutter, relation start
inline tview markup grey text
background highlight (selected items)
secondary highlight (scrollbars, selections)
tertiary highlight (table/matrix cells)
inactive/default state color
inverse text color
addr button background
scroll bar color
tertiary text color
style overrides (cview.Styles)
title text color
inline tview markup white/bright text
log prefix brackets
Apply applies the theme to cview.Styles.
Package-Level Functions (total 3)
TODO split to New and Init
Package-Level Variables (total 2)
printer for numbers TODO global
![]() |
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |