IMPORTANT! Since this is no longer a simple Library rather an full Standalone Addon with an API
This has been renamed to BugEater instead of LibDebug !!!
Please do no longer include a local copy of this Addon with your own rather use it as an Dependency to access it 's API!
What 's new in 1.0 - R10:
- Renamed to BugEater instead of LibDebug
- Finally catches Syntax Errors as well. Yay.
- Avoid Error-Flood. Makes Errors Unique and stops them from spamming
your Chat and Buffer. Enabled by Default (turn it off in Settings -> Debug Settings).
- Updated for the new API-Version (100004)
- Revamped UI. Look and feel as well as Features:
Monospace Font - AnkaCoder, support for unlimited Textlength, proper Line-Width Calculation as in automatically
splitting long lines (the native API doesn't do that), Scrollbar, Mousewheel, Scroll to Bottom, Copy all to Clipboard
- Added Custom Filters. Supporting Lua-Style Regex-Patterns (more info).
Use it to e.g. hide "Looted Sword 123" while still showing "Looted Axe".
Or use it to hide only specific Errors from the Chat Window.
- Added option to Suppress all Gui-Warnings
Including the famous To many Anchors Processed
(all of them are still shown in /error or /debug)
- EditBuffer Component to get around native API-Limitations of TextBufferControl and EditControl.
Known limitations for now: No CTRL+A and no way to select all lines at once with the Mouse
(use the "COPY ALL TO CLIPBOARD" button instead)
- Copy long Text over 1000 Characters to Clipboard (also found in: LibOrangUtils)
- Renamed Debug-Suppression to Addon-Output-Suppression
to make it more clear that this should be disabled by default.
- Some small fixes and code tweaking ...
|
Addon-Description:
BugEater v1.0 - Debugging Addon for Users & Debugging API for Developers ...
What it does for the User:
- Suppress the native Error Dialog (thrown from any Addon or native code!)
- Output Error-Messages in Chat (optional - enabled by default)
- Catch any Addon Output before the Chat has been loaded and display it when it 's ready
- Suppress any Addon Output in Chat - disabled by default
Will hide loot messages from Addons and similiar so beware with using this mindlessly!
Use LibDebug.d() for important messages to get around any filtering / suppression
- /error and /debug command to open an Error- and Debug-Log with Copy & Paste functionality.
A single Window that opens only when you type the respective commands.
- Debugging Output via d() is buffered (or simply said: Saved in the Memory). Even before the Addons
are loaded completely. So all Messages that have been output before the ChatWindow have been initialized
can be stored and displayed later on when the Chat is ready (Settings -> Debug Settings -> Show Pre-Init Debug).
|
What it does for the Developer:
- Have a look at the Source and the API-Funcs below
to get an idea what you can do. Or just have a look with Zgoo (if it 's a Global)
- All messages are stored in BugEater.Buffer - for example all d()-dump messages
are to be found in LibDebug.Buffer.DEBUG and all Error Messages are to be found
in LibDebug.Buffer.ERROR - those are stored here no matter if suppressed or not!
- Add your own BUFFERS! Use the provided API-Functions for that ...
|
To get access to the API - add this to your Addon:
local BugEater = LibStub("BugEaterAPI-1.0")
|
API-Functions:
- function BugEater:d(...) -- copy of the original and unmodified d()
- function BugEater:AddMessage(string msg, string buffer = "DEBUG")
- function BugEater:GetMessage(int index, string buffer)
- function BugEater:GetNumMessages(string buffer)
- function BugEater:PrintMessages(string buffer)
- function BugEater:AddBuffer(string buffer)
- function BugEater:GetBuffer(string buffer)
- function BugEater:FlushBuffer(string buffer)
- function BugEater:EnableErrorDialog()
- function BugEater:DisableErrorDialog()
|
Credits:
-
Andrey Makarov for AnkaCoder Monospace Font.
- Seerah for LibStub and LibAddonMenu as well as some UI setup inspiration from ZAM Notebook.
Cheers!