public
Description: WoW Addon - Debug output frame thing
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tekdebug.git
Click here to lend your support to: tekdebug and make a donation at www.pledgie.com !
tekkub (author)
Sat Aug 23 12:48:23 -0700 2008
commit  94e14c9e8c7f83fc8b76701de217a12691dcff81
tree    423d5e441d2f7f4b05632aee04686a5f842f79f4
parent  63e27f822ec8d087e78661c38756e486852b7f3a
name age message
file LibStub.lua Loading commit data...
file README.textile Sun Aug 17 12:23:03 -0700 2008 Add readme [tekkub]
file changelog.txt
file tekDebug.lua Sun Jul 27 16:15:52 -0700 2008 Remove OH and Dongle, completely standalone now... [tekkub]
file tekDebug.toc
file tekPanelAuction.lua
README.textile

tekDebug is a debug output addon for developers. It provides a handy place to dump debug output for your addon, without spamming the chatframes of your users. To see debug output, the user must install tekDebug.

Adding support to your addon

So how do you use this bugger with your addon? simple!

local f = tekDebug:GetFrame(“MyAddon”)

This gets you a ScrollingMessageFrame to output debuggery into. You can call f:AddMessage(...) directly if you like, pass it off to your Debug lib, whatever.

In my addons this is what I do…

Force tekDebug to load before the addon, if present:

## OptionalDeps: tekDebug

Then make a Debug function (note, this version is NOT nil-safe)

local debugf = tekDebug and tekDebug:GetFrame(“MyAddon”)
local function Debug(…) if debugf then debugf:AddMessage(string.join(", ", …)) end end

Or, if you use Dongle:

MyAddon = DongleStub(“Dongle-1.0”):New(“MyAddon”)
if tekDebug then MyAddon:EnableDebug(1, tekDebug:GetFrame(“MyAddon”)) end

Accessing the output

Now that you’ve got your debug redirected, how do you view it? If you use an LDB quicklauncher addon, you’ll get a launcher there. Otherwise, you can just type /tekdebug or /td

Links

Visit my site for more info.
Please report all bugs and feature requests to my Google Code tracker
Please direct all feedback and questions to my Google Groups mailinglist.