Fandom

WoWWiki

Dongle/DebugPrint API

< Dongle

104,634pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Dongle provides very basic debug and print utility functions to its objects. These come in a number of flavors, detailed below.

This API was introduced with Dongle-1.0

DongleObject:EnableDebug(level[, frame])Edit

Enables debugging for DongleObject at level, output being sent to frame.

ArgumentsEdit

  • level (number) - The debug level to enable. Any messages <= to this level will be displayed.
  • frame (table) - The chat frame to send the output to. This can be any object with an "AddMessage" method, in all actuality.

DongleObject:IsDebugEnabled()Edit

ReturnsEdit

  • debugLevel - The current debugLevel of the DongleObject or nil.
  • debugFrame - The current debugFrame of the DongleObject or nil.

DongleObject:Print(msg, ...)Edit

Sends the message to the debug chat frame (or DEFAULT_CHAT_FRAME). If extra arguments are supplied, the arguments are all tostring()'d and concatenated together with comma separators.

ArgumentsEdit

  • msg (string, boolean, table, function, thread, userdata) - The object to print
  • ... - Any amount of objects to be printed, including nil

DongleObject:PrintF(msg, ...)Edit

Sends the formatted message to the debug chat frame (or DEFAULT_CHAT_FRAME). This function expects a format string, and potentially a number of arguments.

ArgumentsEdit

  • msg (string) - The string to pass to string.format()
  • ... - The arguments to be passed to string.format()

DongleObject:Debug(level, ...)Edit

Sends the debug message to the debug chat frame (or DEFAULT_CHAT_FRAME). If extra arguments are supplied, the arguments are all tostring()'d and concatenated together with comma separators. Message is only printed if level is <= the DongleObject's current debugLevel.

ArgumentsEdit

  • level (number) - The level of message to send
  • ... - Any amount of objects to be printed, including nil

DongleObject:DebugF(level, msg, ...)Edit

Sends the formatted debug message to the debug chat frame (or DEFAULT_CHAT_FRAME). This function expects a format string, and potentially a number of arguments. Message is only printed if level is <= the DongleObject's current debugLevel.

ArgumentsEdit

  • level (number) - The level of message to send
  • msg (string) - The string to pass to string.format()
  • ... - The arguments to be passed to string.format()

Also on Fandom

Random Wiki