Hi.
For debugging purposes, I usually spread out lots of “print out” statements in my code. But for a fast localization of them, I use a sort of tag in order to tell where is the beginning of the debug part and where is the end of it.
For example:
# important code here
variable_x = 0
variable_y = 1
### DEBUG
print(variable_x)
print(variable_y)
### --- DEBUG
In this example, ### DEBUG delimit the beginning of the debug part and ### — DEBUG delimit the end of it.
When I don’t want the debug outputs for a while, I have to go through which one of them commenting them out.
And when I’m done debugging I also have to go through which one of them removing them.
Is there faster way to do these tasks (commenting out and removing), since I have a pattern delimiting my debug parts?
Thanks.