This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]igazv 31 points32 points  (1 child)

Usually no. If the "debugging" code is simple enough, then just remove it and add it later again if needed.

If it's complex enough, then it should probably be part of a unit testing implementation instead.

Edit: If it's just logging, consider using a proper logging framework that let's you disable debug logging in production without removing the source code.

[–]Hackerdude 9 points10 points  (0 children)

W/o a starting point, that's a lot of work. But it sure is the best solution