Nasal library/debug: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
Line 21: Line 21:
! Data !! Meaning
! Data !! Meaning
|-
|-
| type || Type of node as returned by {{func link|props.Node.getType()|ext=http://
| type || Type of node as returned by {{func link|getType()|props|Node}}.
|}
|}



Revision as of 18:56, 16 November 2016

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

This page contains documentation for the debug namespace in Nasal. This namespace provides various useful APIs for debugging Nasal code. The debug namespace is sourced from fgdata/Nasal/debug.nas.

Functions

attributes()

debug.attributes(p[, verbose[, color]]);

Returns a string showing the attributes of the node, in the form (type[, attr[, Lnum[, #refs]]). See the table below for explanation.

p
Mandatory props.Node object.
verbose
Optional bool specifying whether to show the number of times the node is referenced. Defaults to 1 (true).
color
Optional bool specifying whether to output the string with an ANSI color code This is a link to a Wikipedia article. Defaults to nil.
Data Meaning
type Type of node as returned by props.Node.getType() .

backtrace()

bt()

benchmark()

benchmark_time()

dump()

isnan()

local()

print_rank()

printerror()

propify()

proptrace()

rank()

string()

tree()

warn()