Download
(167 Kb)
Download
Updated: 06/01/14 05:50 AM
Pictures
File Info
Compatibility:
Live (1.0)
Updated:06/01/14 05:50 AM
Created:04/23/14 12:20 PM
Monthly downloads:198
Total downloads:29,355
Favorites:64
MD5:
BugEater (formerly LibDebug)  Popular! (More than 5000 hits)
Version: 1.0 - R10
by: thelegendaryof [More]
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!
Known issues:
  • Somehow the native Error-Window can't be showed anymore.
    I don't know what 's causing this right now but it has a small priority
    because it 's useless to begin with and this aims at delivering a better UI.

Version 1.0 - R10 (Current):
  • Slightly improved Pre-Init Error-Detection and Suppression.

Version 1.0 - R9:
  • Cleaned up d() - it now takes multiple arguments and tables like before.
    f.e.: d("this", "is", "a", "test", {["TEST123"] = true })

Version 1.0 - R8:
  • Now properly strips colors before calculating line-width
  • Renamed "Error catched:" to "Error caught:"

Version 1.0 - R7:
  • 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).

Version 1.0 - R6:
  • Finally catches Syntax Errors as well. Yay.

Version 1.0 - R5:
  • Added Custom Filters. Supporting LUA-Style Regex-Patterns.
    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.
  • Settings are now saved Account-Wide rather then Character-Specific.

Version 1.0 - R4:
  • Added option to Suppress all Gui-Warnings including the famous
    "To many Anchors processed" (they are still shown in /error or /debug)
  • Updated for the new API-Version (100004)

Version 1.0 - R3:
  • Renamed from LibDebug to BugEater
  • Fixed small Bug with the Scrollbar

Version 1.0 - R2:
  • Revamed UI. Look and feel as well as features:
    Monospace Font - AnkaCoder, Support for unlimited Textlength,
    Scrollbar, Mousewheel, Scroll to Bottom, Copy All Button, ...
  • Implemented EditBuffer Component to get around native API-Limitations
    of TextBufferControl and EditControl. Known limitations for now (workaround in progress):
    No CTRL+A and no way to select all lines at once with the Mouse (use the "COPY ALL" button instead)
  • Implemented method to copy long text over 1000 characters to clipboard
  • Renamed Debug-Surpression to Addon-Output-Surpression
    to make it more clear that this should be disabled by default.
  • Some small fixes and code tweaking

Version 1.0 - R1:
  • Small Hotfix / Bugfix

Version 1.0:
  • Initial Release
Optional Files (0)


Archived Files (10)
File Name
Version
Size
Uploader
Date
1.0 - R9
167kB
thelegendaryof
05/31/14 07:58 AM
1.0 - R8
167kB
thelegendaryof
05/30/14 10:01 AM
1.0 - R7
167kB
thelegendaryof
05/25/14 06:21 AM
1.0 - R6
166kB
thelegendaryof
05/24/14 11:09 AM
1.0 - R5
166kB
thelegendaryof
05/23/14 09:10 AM
1.0 - R4
166kB
thelegendaryof
05/22/14 01:47 PM
1.0 - R3
166kB
thelegendaryof
05/20/14 06:12 PM
1.0 - R2
166kB
thelegendaryof
05/20/14 12:21 PM
1.0 - R1
8kB
thelegendaryof
04/23/14 03:07 PM
1.0
8kB
thelegendaryof
04/23/14 12:20 PM


Post A Reply Comment Options
Unread 04/28/14, 09:11 AM  
MartinL

Forum posts: 5
File comments: 98
Uploads: 0
Getting a few error.

user:/AddOns/CraftResearchTimer/lua/CraftResearchTimer.lua:201: attempt to index a nil value
stack traceback:
user:/AddOns/CraftResearchTimer/lua/CraftResearchTimer.lua:201: in function 'initmessage'
user:/AddOns/CraftResearchTimer/lua/CraftResearchTimer.lua:183: in function 'Setup_craft'
user:/AddOns/CraftResearchTimer/lua/CraftResearchTimer.lua:129: in function 'cratftimerupdate'
5049221232296909379:3: in function '(main chunk)'

user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:
user:/AddOns/LibDebug/LibDebug.lua:260: in function 'LibDebug_OnUIError'
user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:
user:/AddOns/LibDebug/LibDebug.lua:260: in function 'LibDebug_OnUIError'
user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:
user:/AddOns/LibDebug/LibDebug.lua:260: in function 'LibDebug_OnUIError'
user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:
user:/AddOns/LibD
Report comment to moderator  
Reply With Quote
Unread 04/27/14, 05:40 AM  
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view AddOns

Forum posts: 161
File comments: 88
Uploads: 7
Yep thats true. A few developers are using it for regular messages as well. Thats also why its disabled by default. I'm already searching for solutions and will add a better description what the function does and the drawbacks it might bring, which will come in version 1.1 when I'm back home (i dont have access to a pc right now).

Cheers
Last edited by thelegendaryof : 04/27/14 at 05:43 AM.
Report comment to moderator  
Reply With Quote
Unread 04/26/14, 06:44 PM  
Zinival
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 53
Uploads: 4
Thanks for this. It's really useful to not have error windows popping up in combat.

As a heads up to anyone using this:
If you check "Surpress Debug-Output in Chat" in the options, it seems to also inadvertently suppress chat output from other mods, such as mods that output loot or xp gains to chat. It took a while for me to figure out why the loot notification from Wykkyd's Framework or the xp notifications from X4D XP weren't working. They started working again as soon as I unchecked "Surpress Debug-Output in Chat". I hope this helps anyone experiencing the same issue.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 08:05 PM  
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view AddOns

Forum posts: 161
File comments: 88
Uploads: 7
Originally Posted by Joviex
Again, great idea, but not when it manipulates the global space even if I dont use it.
I've posted an long, long, long answer with usage examples and deep explanation why I do this in the Forum-Thread this orginated from ...

http://www.esoui.com/forums/showthread.php?t=709

To make it short:
  1. I'll finetune that a bit like I posted only really hiding the DEBUG output and no custom buffers
  2. It 's completely up to the User and disabled by default - there is NO way given to surpress them from an addon automatically. The user has to go to Debug Settings -> And tick "Surpress Debug-Output in Chat". It 's ment for addons that aren't properly using d() as intended, or are broken and keep spamming their messages with d() in the Chat Window. When a user has no developing skills he can just disable the output and keep using that Addon in the meantime till it gets updated (if it gets updated anytime at all). Another example would be that the Addon developer gave no Option to disable the Output to the ChatWindow but you really need (for whatever reason) or want the ChatWindow to be clean for the next 10 Minutes as you're in a Dungeon - then surpress all Debugging Output in the Meantime. ps.: Sorry if I repeated myself thrice or make some other misstakes - just trying to dump my brain and keep you informed about my intends properly before it shuts down. Haha! Better going to sleep now.
  3. It 's as less intrusive as possible, meaning it shouldn't break anything - just add functionality on top of it (sadly you can't give an option for hooks as SaveData is not aviable before load
Last edited by thelegendaryof : 04/23/14 at 08:16 PM.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 07:32 PM  
Lichbane

Forum posts: 8
File comments: 30
Uploads: 0
Excellent. Thanks for doing this.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 05:28 PM  
Joviex
 
Joviex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 110
Uploads: 3
Originally Posted by thelegendaryof
It modifies the native functions of ESO namely d() so it 's global no matter if you implement it in your Addon or not. If you have it running once either as an Standalone-Addon or as an Library the core-functions are there. All of them are as lightweight as possible and can be turned of in Settings -> Debug Settings.
Yes +P which is where I was going with that.

It is a "globally" destructive thing, even if I dont use it myself.

IOW, any author who stuffs this into an addon will cause it to overwrite the functionality of my d().

Is that a good idea? Or do I have to contend with no longer using d() because someone decided to supress it via the settings from some other plugin using this?

Again, great idea, but not when it manipulates the global space even if I dont use it.
Last edited by Joviex : 04/23/14 at 05:30 PM.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 03:02 PM  
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view AddOns

Forum posts: 161
File comments: 88
Uploads: 7
Originally Posted by SkOODaT
user:/AddOns/LibDebug/LibDebug.lua:260: in function 'LibDebug_OnUIError'|r
2014-04-23T15:10:48.324-05:00 |cff0000Lua Error: user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:

still works tho
Ah I lemme see I'll provide a Hotfix for it in case ZO_ChatWindowTemplate1Buffer isn't loaded yet!

Edit: 1.0.1 Hotfix out.
Last edited by thelegendaryof : 04/23/14 at 03:08 PM.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 02:59 PM  
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 169
Uploads: 11
user:/AddOns/LibDebug/LibDebug.lua:260: in function 'LibDebug_OnUIError'|r
2014-04-23T15:10:48.324-05:00 |cff0000Lua Error: user:/AddOns/LibDebug/LibDebug.lua:260: attempt to index a nil value
stack traceback:

still works tho
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 02:24 PM  
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view AddOns

Forum posts: 161
File comments: 88
Uploads: 7
It 's both a Plugin for the Enduser (for example to use it for Error Surpression and the like) and a Debugging Library for Developers - as in you can provide a local copy of it with your own Addons just like LibAddonMenu.

Simply said:

If you don't need it as an Library for your Addon you can just install it as a Plugin. As it properly is based on LibStub it shouldn't load twice and only the most recent version will get loaded (hopefully ).

It modifies the native functions of ESO namely d() so it 's global no matter if you implement it in your Addon or not. If you have it running once either as an Standalone-Addon or as an Library the core-functions are there. All of them are as lightweight as possible and can be turned of in Settings -> Debug Settings.

Edit - Some more insight:

/zgoo LibDebug displays the public methods that can be used from that Library - no internal functions that you shouldn't touch. The later ones are stored as local functions and can't be accessed directly. They should be already be pretty complete and are ready for usage. However not documented yet - you can also have a look at the Sourcecode and my tips in the "For Developers" section in the Addon-Desciprtion - which I just updated - to get an idea till I have the docs up.
Last edited by thelegendaryof : 04/23/14 at 02:52 PM.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 02:15 PM  
Joviex
 
Joviex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 42
File comments: 110
Uploads: 3
Great idea. I am a little confused however. Is this a library or an addon?

Do I install this into all my addons like LibStub, LibAddonMenu.... because it would seem to then be global to all addons that might use it, versus contained locally to the addons that use it i.e. a true library.


So is it an addon, or does it have hooks to "inject" the settings for "debug mode" per addon?


Is there a roadmap to break it out as a true library?
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 02:00 PM  
thelegendaryof
 
thelegendaryof's Avatar
AddOn Author - Click to view AddOns

Forum posts: 161
File comments: 88
Uploads: 7
Just in case any Developer wants to surpass the d() chat-output suppression (the suppression is disabled by default!)

Use LibDebug.d() instead to print important messages to get around any suppression or modification as it 's a unmodified copy of the original function! But keep in mind that output with that method won't get buffered/stored in LibDebug!

But keep it limited to important Messages only as even with surpression applied all debugging output is stored in LibDebug.Buffer.DEBUG which you can display in the Debug-Log with C&P functionality simply by typing the command /debug.
Last edited by thelegendaryof : 04/23/14 at 02:45 PM.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 01:45 PM  
Visur
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 22
Uploads: 4
Thanks for this add-on.
Report comment to moderator  
Reply With Quote
Unread 04/23/14, 01:36 PM  
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 169
Uploads: 11
BEST ADDON EVER

This was badly needed considering everyone is still working on thier addons its nice to be able to completely suppress the errors until you need to really look at them

THANK YOU
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: