PROPOSAL: Disable DEBUG compilation per-object
We posting spin language proposals now?
There's already a number of
DEBUG_ constants that can be defined to modify DEBUG behaviour.
Can we add one that disables compilation of debug statements on a per-object basis? Maybe
DEBUG_DISABLE ? This way, debug code could be left in a library object without clogging up the main application's output. Especially relevant to the USB code, since in some cases there are timing issues caused by the DEBUG output.
- If the debugger is not enabled, no debug statements are built, full stop.
- If the debugger is enabled and
DEBUG_DISABLEis set in an object, debug statements in that object are not built.
- If the debugger is enabled and the special constant is not set, build debug statements as normal.