Apart from error codes, error strings and logs, are there any other features which can be incorporated in the code to increase getting debug / trace information during code
When building for Linux, I like to be able to print a stack backtrace from a signal handler. This helps debug crashes (SIGSEGV) or allows me to send a signal to the program to initiate a stack backtrace at runtime. Core dumps can also be useful in debugging crashes (again in Linux).