v.debug #
fn add_after_call #
fn add_after_call(func HookFnCall) HookFnCall
add_after_call adds a fn hook to after hook list and returns its id
fn add_before_call #
fn add_before_call(func HookFnCall) HookFnCall
add_before_call adds a fn hook to before hook list and return its id
fn callstack #
fn callstack(depth int) ?FnTrace
callstack retrieves the supplied stack frame based on supplied depth
fn dump_callstack #
fn dump_callstack()
dump_callstack dumps callstack to the user
fn remove_after_call #
fn remove_after_call(func HookFnCall)
remove_after_call removes a fn hook from after hook list by its idx
fn remove_before_call #
fn remove_before_call(func HookFnCall)
remove_before_call removes a fn hook from before hook list by its idx
fn (Debugger) interact #
fn (mut d Debugger) interact(info DebugContextInfo) !
interact displays the V debugger REPL for user interaction
struct DebugContextInfo #
struct DebugContextInfo {
is_anon bool // cur fn is anon?
is_generic bool // cur fn is a generic?
is_method bool // cur fn is a bool?
receiver_typ_name string // cur receiver type name (method only)
line int // cur line number
file string // cur file name
mod string // cur module name
fn_name string // cur function name
scope map[string]DebugContextVar // scope var data
}
DebugContextInfo has the context info for the debugger repl
struct DebugContextVar #
struct DebugContextVar {
name string // var name
typ string // its type name
value string // its str value
}
DebugContextVar holds the scope variable information
struct FnTrace #
@[markused]
struct FnTrace {
pub:
name string
file string
line i64
}
function call location trace
struct TraceHook #
@[noinit]
struct TraceHook {
mut:
in_hook bool
pub mut:
trace_after_call []HookFnCall
trace_before_call []HookFnCall
}