Lua Class - debug

debug is a class that contains 0 properties, 3 methods and 2 events.

This class cannot be constructed, it is managed by Teverse.

This singleton provides a safe wrapper for accessing some essential Lua debugging functions. It is accessed through teverse.debug and requires the permission to be defined in your tevapp manifest file.

This singleton can be used to create an interface for viewing an app's output.

Properties
Methods
table getOutputHistory( )

Returns a table of dictionaries: {time, message}

CODE SAMPLE
debug:getOutputHistory() --> {}
schedulerUi( )

Undocumented

CODE SAMPLE
debug:schedulerUi() --> 
string traceback( )

Returns a string with a traceback of the stack call.

CODE SAMPLE
debug:traceback() --> ""
Events
:on("changed", function( string property, variant oldValue, variant newValue ) end)

Fired when a property is changed.

CODE SAMPLE
debug:on("changed", function(property, oldValue, newValue)
  print(property) --> ""  print(oldValue) --> variant  print(newValue) --> variant
end)
:on("print", function( string message ) end)

Fired when a print occurs

CODE SAMPLE
debug:on("print", function(message)
  print(message) --> ""
end)

Some sections of our docs are maintained on github.