I am using VS2010 C++.
For debugging reasons I have commented out lines like this:
ms+=t.getElapsedTimeInMicroSec();
became
//timer:ms+=t.getElapsedTimeInMicroSec();
Now when I want to include all timer lines, I do a simply text replace and replace all "//timer:" with an empty string, and all these lines become active again. But there is no way to include the "//timer:" on all lines again.
I could use
#ifdef _MYVAR
ms+=t.getElapsedTimeInMicroSec();
#endif
instead, but that would make my code much less readable.
Is there a simply solution for my problem, for example a switch that I put in front of each line to activate or deactive the lines?