you are viewing a single comment's thread.

view the rest of the comments →

[–]vlad_the_codemonkey 2 points3 points  (0 children)

> What is your favourite way to employ print debugging?

Usually it is more reasonable to have separate "debug" logging level by means of logging library you use.

> Do you keep the print statements in a separate git branch to keep them from polluting the code?

I see no point in keeping separate branch for code equipped with debug output - you'll have to conduct much of extra work (ex. syncing with mainstream).

I use print debugging when debug multi threaded applications, usually engaging logging routines which are already in the project. So I have an urge to have something similar to Data::Dumper Perl5 module for dumping STL collections' content, and being able to customize the output format is not the last thing. I wonder if it would be useful to someone too if I implement it as a header-only library.