Document tracemask strings and add note in testing.md

Also make the examples in the testing.md docs self-consistent.
This commit is contained in:
John Beard 2018-11-26 16:25:12 +00:00 committed by Wayne Stambaugh
parent db07b43674
commit 369d172460
2 changed files with 36 additions and 4 deletions

View File

@ -224,11 +224,14 @@ a "mask", for example:
This will not be printed by default. To show it, set the `WXTRACE` environment This will not be printed by default. To show it, set the `WXTRACE` environment
variable when you run KiCad to include the masks you wish to enable: variable when you run KiCad to include the masks you wish to enable:
$ WXTRACE="TRACEKEY,OTHERKEY" kicad $ WXTRACE="TRACEMASK,OTHERMASK" kicad
When printed, the debug will be prefixed with a timestamp and the trace mask: When printed, the debug will be prefixed with a timestamp and the trace mask:
11:22:33: Trace: (KICAD_FIND_ITEM) item Symbol GNDPWR, #PWR020 11:22:33: Trace: (TRACEMASK) My trace, value: 42
If you add a trace mask, define and document the mask as a variable in
`include/trace_helpers.h`. This will add it to the [trace mask documentation][].
Some available masks: Some available masks:
@ -261,3 +264,4 @@ Some available masks:
[Boost Unit Test framework]: https://www.boost.org/doc/libs/1_68_0/libs/test/doc/html/index.html [Boost Unit Test framework]: https://www.boost.org/doc/libs/1_68_0/libs/test/doc/html/index.html
[boost-test-functions]: https://www.boost.org/doc/libs/1_68_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref.html [boost-test-functions]: https://www.boost.org/doc/libs/1_68_0/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref.html
[AFL fuzzing tool]: http://lcamtuf.coredump.cx/afl/ [AFL fuzzing tool]: http://lcamtuf.coredump.cx/afl/
[trace mask documentation]: http://docs.kicad-pcb.org/doxygen/group__trace__env__vars.html

View File

@ -49,72 +49,100 @@
/** /**
* Flag to enable find debug tracing. * Flag to enable find debug tracing.
*
* Use "KICAD_FIND_ITEM" to enable.
*/ */
extern const wxChar* const traceFindItem; extern const wxChar* const traceFindItem;
/** /**
* Flag to enable find and replace debug tracing. * Flag to enable find and replace debug tracing.
*
* Use "KICAD_FIND_REPLACE" to enable.
*/ */
extern const wxChar* const traceFindReplace; extern const wxChar* const traceFindReplace;
/** /**
* Flag to enable draw panel coordinate debug tracing. * Flag to enable draw panel coordinate debug tracing.
*
* Use "KICAD_COORDS" to enable.
*/ */
extern const wxChar* const kicadTraceCoords; extern const wxChar* const kicadTraceCoords;
/** /**
* Flag to enable wxKeyEvent debug tracing. * Flag to enable wxKeyEvent debug tracing.
*
* Use "KICAD_KEY_EVENTS" to enable.
*/ */
extern const wxChar* const kicadTraceKeyEvent; extern const wxChar* const kicadTraceKeyEvent;
/** /**
* Flag to enable auto save feature debug tracing. * Flag to enable auto save feature debug tracing.
*
* Use "KICAD_AUTOSAVE" to enable.
*/ */
extern const wxChar* const traceAutoSave; extern const wxChar* const traceAutoSave;
/** /**
* Flag to enable schematic library memory deletion debug output. * Flag to enable schematic library memory deletion debug output.
*
* Use "KICAD_SCH_LIB_MEM" to enable.
*/ */
extern const wxChar* const traceSchLibMem; extern const wxChar* const traceSchLibMem;
/** /**
* Flag to enable legacy schematic plugin debug output. * Flag to enable legacy schematic plugin debug output.
*
* Use "KICAD_SCH_LEGACY_PLUGIN" to enable.
*/ */
extern const wxChar* const traceSchLegacyPlugin; extern const wxChar* const traceSchLegacyPlugin;
/** /**
* Flag to enable GEDA PCB plugin debug output. * Flag to enable GEDA PCB plugin debug output.
*
* Use "KICAD_PCB_PLUGIN" to enable.
*/ */
extern const wxChar* const traceKicadPcbPlugin; extern const wxChar* const traceKicadPcbPlugin;
/** /**
* Flag to enable GEDA PCB plugin debug output. * Flag to enable GEDA PCB plugin debug output.
*
* Use "KICAD_GEDA_PLUGIN" to enable.
*/ */
extern const wxChar* const traceGedaPcbPlugin; extern const wxChar* const traceGedaPcbPlugin;
/** /**
* Flag to enable print controller debug output. * Flag to enable print controller debug output.
*
* Use "KICAD_PRINT" to enable.
*/ */
extern const wxChar* const tracePrinting; extern const wxChar* const tracePrinting;
/** /**
* Flag to enable path and file name debug output. * Flag to enable path and file name debug output.
*
* Use "KICAD_PATHS_AND_FILES" to enable.
*/ */
extern const wxChar* const tracePathsAndFiles; extern const wxChar* const tracePathsAndFiles;
/** /**
* Flag to enable locale debug output. * Flag to enable locale debug output.
*
* Use "KICAD_LOCALE" to enable.
*/ */
extern const wxChar* const traceLocale; extern const wxChar* const traceLocale;
/** /**
* Flag to enable debug output of #BASE_SCREEN and it's derivatives. * Flag to enable debug output of #BASE_SCREEN and it's derivatives.
*
* Use "KICAD_SCREEN" to enable.
*/ */
extern const wxChar* const traceScreen; extern const wxChar* const traceScreen;
/** /**
* Flag to enable debug output of zoom-scrolling calculations in * Flag to enable debug output of zoom-scrolling calculations in
* #KIGFX::ZOOM_CONTROLER and derivatives. * #KIGFX::ZOOM_CONTROLLER and derivatives.
*
* Use "KICAD_ZOOM_SCROLL" to enable.
*/ */
extern const wxChar* const traceZoomScroll; extern const wxChar* const traceZoomScroll;