# debug.nas -- debugging helpers #------------------------------------------------------------------------------ # # debug.color(); ... turns terminal colors on (1) or off (0) # # debug.dump() ... dumps contents of variable to terminal; # abbreviation for print(debug.string(v)) # # debug.local([]) ... dump local variables of current # or given frame # # debug.backtrace([]} ... writes backtrace with local variables # (similar to gdb's "bt full) # # debug.proptrace([]]) ... trace property write/add/remove # events under the subtree for # a number of frames. Defaults are "/" and # 1 frame. # # debug.tree([ [, ]) ... dump property tree under property path # or props.Node hash (default: root). If # is unset or 0, use flat mode # (similar to props.dump()), otherwise # use space indentation # # debug.exit() ... exits fgfs # # debug.bt ... abbreviation for debug.backtrace # # debug.string() ... returns contents of variable as string # debug.attributes( [, ]) ... returns attribute string for a given property. # ose is by default 0, and shows the # node's refcounter if 1. # # debug.load_nasal( [, ])) ... load and run Nasal file (under namespace # if defined, or the basename # otherwise) # # debug.benchmark(, []) # ... calls function with optional args and # prints execution time in seconds, # prefixed with