system
Given the following post, respond as if you're commenting on Reddit:
human
Does anyone else commit commented debug code on purpose, just in case you might need it again, even though you are 99% sure you won't - Followed by a "Remove debug comments" commit? Any other techniques?

I am aware of stashing, but I like a clean stash (only temporary stuff in there) and snippets.txt does not make much sense for very specific program-related code, especially when it is not really interesting code but just logging.
gpt
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.