It can be useful, but mostly as a debugging aid. Rather than an option the user can turn on and off you might consider just making it a debug option. I use:
Lua Code:
addon =
{
...
debug =
{
}
...
}
The debug variable acts as a switch for general debugging. Specific parts of debugging, like logging events and such, are controlled with variables within that table. I then just change it to nodebug when I want to turn it off for release. I can always turn it back on at the command line with addon.debug = addon.nodebug. The actual check in the code for suboptions is:
Lua Code:
if (addon.debug and addon.debug.option) then
end
where addon is the global for the addon, i.e. the addon name.