Nasal library/debug: Difference between revisions
Jump to navigation
Jump to search
Red Leader (talk | contribs) (Start attributes()) |
Red Leader (talk | contribs) (→attributes(): Start) |
||
Line 7: | Line 7: | ||
{{Nasal doc | {{Nasal doc | ||
|syntax = debug.attributes(p[, verbose[, color]]); | |syntax = debug.attributes(p[, verbose[, color]]); | ||
|text = | |text = Returns a string showing the attributes of the node, in the form <code>(''type''[, ''attr''[, L''num''[, #''refs'']])</code>. See the table below for explanation. | ||
|param1 = p | |param1 = p | ||
|param1text = | |param1text = Mandatory <code>props.Node</code> object. | ||
|param2 = verbose | |param2 = verbose | ||
|param2text = | |param2text = Optional bool specifying whether to show the number of times the node is referenced. Defaults to 1 (true). | ||
|param3 = color | |param3 = color | ||
|param3text = | |param3text = Optional bool specifying whether to output the string with an {{wikipedia|ANSI escape code#Colors|ANSI color code}}. Defaults to <code>'''nil'''</code>. | ||
|example1 = | |example1 = | ||
}} | }} | ||
{| class="wikitable" | |||
! Data !! Meaning | |||
|- | |||
| type || Type of node as returned by {{func link|props.Node.getType()|ext=http:// | |||
|} | |||
=== backtrace() === | === backtrace() === |
Revision as of 19:38, 15 November 2016
Work in progress This article or section will be worked on in the upcoming hours or days. See history for the latest developments. |
The FlightGear forum has a subforum related to: Nasal Scripting |
Nasal scripting |
---|
Nasal internals |
---|
Memory Management (GC) |
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 . Defaults to
nil
.
Data | Meaning |
---|---|
type | props.Node.getType()|ext=http:// |