Add cache for debug messages
rdw-software opened this issue ยท 2 comments
Currently, debugging is started as soon as the debug command is being entered. This means that it needs to be activated previous to encountering any bugs to display anything useful.
It'd be much better if debug messages were logged separately, in a cache of sorts, and the debug command would simply show its contents for the past X minutes or so. The cache can be emptied regularly if data accrual is an issue.
It'd also be nicer to display the messages in a separate debug frame, but that's more work obviously. Maybe there's a library for this functionality already? I've definitely seen it in some other addons.
Initial brainstorming for a potential Debug Stack and its operations:
- Print X recent messages
- Clear
- Print number of stored messages
- Print memory usage
- Filter and show by type
- Slash Commands
- Add setting to config GUI
- Show in separate window
- Copy & Paste window contents
Undecided:
- Disable in release versions?
- Add usage to readme and FAQ?
Basic cache functionality added in c834197.
I'll add a new issue to extend the feature. It needs some work, optimization etc., but it could be used to troubleshoot problems more easily already.
Since relatively few messages are being cached, the unoptimized impact should be minimal as it is. I believe it's worth it to deploy so that users can report their bugs in a way that allows me to fix them without having to reproduce every step, which I really don't have the time to do currently.