during debug mode or while i am doing testing, i need to print lost of various information, so i use this method
ifdef TESTING
// code with lots of debugging info
else
// clean code only
endif // TESTING`
Is this the good method, or is there any other simple and elegant method.
But this way, I am repating the same code in two places and if anything is to be changed later on in the code, I have to do it in both places, which is time consuming and error prone.
Thanks.
I am using MS Visual Studio.