HomeManualTopicsTypesSymbols

debug::dump

writes a string representation of an object to stderr

Parameters

depth (default: 1)
the desired level of detail (recursion depth)
label
the label to use for the expression
expr
the expression

Results

None

Description

The function displays a label and the object's attribute via introspection.

The function can be called without I/O-access rights.

The string representation is converted to utf-8 before beeing written.

The optional depth argument specifies the maximum recursion depth used to display the object's attributes.

Example

$name_of () $age_of () $obj std_types::object .name_of "Albert" .age_of 42 debug::dump 2 `obj

Error output

obj: object name_of: "Albert" age_of: 42

Topic

Debug

See also

debug::dump_object writes a string representation of an object to stderr
debug::println writes the given string and a newline character to stderr
debug::print writes the given string to stderr