Debugging should be configurable i.e. turned ON and OFF. Use the C precompiler conditional statements, printf's and the debugging functions implemented in the standard device server api library. One precompiler option which should always be used is DS_DEBUG. This can be used to print general information about the device and/or class. New classes which require special debugging options should add them as they need e.g. SL_DEBUG for serial line debugging.
Symbolic debuggers exist on all platforms and can be used to assist the debugging process. Debugging options should be described in the Design Documentation.
It is useful to always have a debugging version of each class always ready so that in the case of doubt or problems this version can be loaded and used to identify the problem(s).