← Back to team overview

kicad-developers team mailing list archive

Trace variables documentation

 

Hi,

Having just found the trace_helpers header (which I totally missed
when making a list of the trace strings...), I have a couple of ideas.

First: is there milage to add the strings to the trace variable docs?
This means you can easily see what you should be writing in WXTRACE
without having to dig into the .cpp source docs. Generally, the
implicit rule is "Add KICAD_, camel->upper-with-underscore", but not
always (AutoSave -> AUTOSAVE).

Second: it is possible to define a variable in other places and have
it added to the trace_env_vars group. For example, in a .cpp:

/** \addtogroup trace_env_vars
 *  @{
 */

/**
 * Enable debug for
 */
static const wxChar* const traceLocal = wxT( "KICAD_TRACE_LOCAL" );

/** @}*/

Perhaps not collecting all the trace variables unnecessarily in one
header might avoid creating a(nother) header that involves very big
recompilations for minor changes (e.g. base_frame.h and bitmaps.h).
There are only a few now, but if we get a more comprehensive or
granular set of trace variables, this header could become quite
spidery.

Using the doxygen group would allow documentation to be collated
without introducing code-level dependencies. Very many trace variables
will only be used in a single file. If a trace var is shared, then a
common header may be appropriate.

Cheers,

John


Follow ups