Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
200 views
in Q2A Core by
edited by
Well, I'm using the events module, and I want to make some debugs to test things (make outputs), but that is hard because the page makes a redirect, so I will not see the output.

So I though that it would be a great feature to implement at the end of the page, in debug mode, a simple area where outputs would be shown. And that outputs would be stored in the DB until the developer decide to clean them.

1 Answer

0 votes
by

This itself sounds like a great idea for a plugin!

It could have an event module which records Q2A's standard events in its own database table, but also has a custom function which can be called to record debug info. It could then use a layer to show the last X lines from this table at the bottom of every page.

Any other code could send debug messages to this module by first loading the module's class using qa_load_module(...) in qa-base.php, then calling the class function in the usual PHP way. If the module isn't present, qa_load_module(...) will return null.

...